You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/user_guide/indexing.rst
+5-5
Original file line number
Diff line number
Diff line change
@@ -435,7 +435,7 @@ Selection By Position
435
435
This is sometimes called ``chained assignment`` and should be avoided.
436
436
See :ref:`Returning a View versus Copy <indexing.view_versus_copy>`.
437
437
438
-
Pandas provides a suite of methods in order to get **purely integer based indexing**. The semantics follow closely Python and NumPy slicing. These are ``0-based`` indexing. When slicing, the start bounds is *included*, while the upper bound is *excluded*. Trying to use a non-integer, even a **valid** label will raise an ``IndexError``.
438
+
Pandas provides a suite of methods in order to get **purely integer based indexing**. The semantics follow closely Python and NumPy slicing. These are ``0-based`` indexing. When slicing, the start bound is *included*, while the upper bound is *excluded*. Trying to use a non-integer, even a **valid** label will raise an ``IndexError``.
439
439
440
440
The ``.iloc`` attribute is the primary access method. The following are valid inputs:
441
441
@@ -545,7 +545,7 @@ Selection By Callable
545
545
.. versionadded:: 0.18.1
546
546
547
547
``.loc``, ``.iloc``, and also ``[]`` indexing can accept a ``callable`` as indexer.
548
-
The ``callable`` must be a function with one argument (the calling Series, DataFrame or Panel) and that returns valid output for indexing.
548
+
The ``callable`` must be a function with one argument (the calling Series, DataFrame or Panel) that returns valid output for indexing.
549
549
550
550
.. ipython:: python
551
551
@@ -569,7 +569,7 @@ You can use callable indexing in ``Series``.
569
569
df1.A.loc[lambdas: s >0]
570
570
571
571
Using these methods / indexers, you can chain data selection operations
572
-
without using temporary variable.
572
+
without using a temporary variable.
573
573
574
574
.. ipython:: python
575
575
@@ -907,7 +907,7 @@ of the DataFrame):
907
907
908
908
df[df['A'] >0]
909
909
910
-
List comprehensions and ``map`` method of Series can also be used to produce
910
+
List comprehensions and the ``map`` method of Series can also be used to produce
911
911
more complex criteria:
912
912
913
913
.. ipython:: python
@@ -1556,7 +1556,7 @@ See :ref:`Advanced Indexing <advanced>` for usage of MultiIndexes.
1556
1556
ind
1557
1557
1558
1558
``set_names``, ``set_levels``, and ``set_codes`` also take an optional
0 commit comments