Skip to content

Commit 2299693

Browse files
sharad-vmjreback
authored andcommitted
Fixes Update docs on reserved attributes #20878 (#20933)
1 parent d15c104 commit 2299693

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

doc/source/indexing.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ of multi-axis indexing.
9696

9797
.. versionadded:: 0.18.1
9898

99-
See more at :ref:`Selection by Position <indexing.integer>`,
99+
See more at :ref:`Selection by Position <indexing.integer>`,
100100
:ref:`Advanced Indexing <advanced>` and :ref:`Advanced
101101
Hierarchical <advanced.advanced_hierarchical>`.
102102

@@ -125,7 +125,7 @@ Basics
125125
As mentioned when introducing the data structures in the :ref:`last section
126126
<basics>`, the primary function of indexing with ``[]`` (a.k.a. ``__getitem__``
127127
for those familiar with implementing class behavior in Python) is selecting out
128-
lower-dimensional slices. The following table shows return type values when
128+
lower-dimensional slices. The following table shows return type values when
129129
indexing pandas objects with ``[]``:
130130

131131
.. csv-table::
@@ -235,7 +235,7 @@ as an attribute:
235235
- The attribute will not be available if it conflicts with an existing method name, e.g. ``s.min`` is not allowed.
236236

237237
- Similarly, the attribute will not be available if it conflicts with any of the following list: ``index``,
238-
``major_axis``, ``minor_axis``, ``items``, ``labels``.
238+
``major_axis``, ``minor_axis``, ``items``.
239239

240240
- In any of these cases, standard indexing will still work, e.g. ``s['1']``, ``s['min']``, and ``s['index']`` will
241241
access the corresponding element or column.
@@ -888,10 +888,10 @@ Boolean indexing
888888
.. _indexing.boolean:
889889

890890
Another common operation is the use of boolean vectors to filter the data.
891-
The operators are: ``|`` for ``or``, ``&`` for ``and``, and ``~`` for ``not``.
891+
The operators are: ``|`` for ``or``, ``&`` for ``and``, and ``~`` for ``not``.
892892
These **must** be grouped by using parentheses, since by default Python will
893-
evaluate an expression such as ``df.A > 2 & df.B < 3`` as
894-
``df.A > (2 & df.B) < 3``, while the desired evaluation order is
893+
evaluate an expression such as ``df.A > 2 & df.B < 3`` as
894+
``df.A > (2 & df.B) < 3``, while the desired evaluation order is
895895
``(df.A > 2) & (df.B < 3)``.
896896

897897
Using a boolean vector to index a Series works exactly as in a NumPy ndarray:
@@ -944,8 +944,8 @@ and :ref:`Advanced Indexing <advanced>` you may select along more than one axis
944944
Indexing with isin
945945
------------------
946946

947-
Consider the :meth:`~Series.isin` method of ``Series``, which returns a boolean
948-
vector that is true wherever the ``Series`` elements exist in the passed list.
947+
Consider the :meth:`~Series.isin` method of ``Series``, which returns a boolean
948+
vector that is true wherever the ``Series`` elements exist in the passed list.
949949
This allows you to select rows where one or more columns have values you want:
950950

951951
.. ipython:: python
@@ -1666,7 +1666,7 @@ Set an index
16661666

16671667
.. _indexing.set_index:
16681668

1669-
DataFrame has a :meth:`~DataFrame.set_index` method which takes a column name
1669+
DataFrame has a :meth:`~DataFrame.set_index` method which takes a column name
16701670
(for a regular ``Index``) or a list of column names (for a ``MultiIndex``).
16711671
To create a new, re-indexed DataFrame:
16721672

@@ -1707,9 +1707,9 @@ the index in-place (without creating a new object):
17071707
Reset the index
17081708
~~~~~~~~~~~~~~~
17091709

1710-
As a convenience, there is a new function on DataFrame called
1711-
:meth:`~DataFrame.reset_index` which transfers the index values into the
1712-
DataFrame's columns and sets a simple integer index.
1710+
As a convenience, there is a new function on DataFrame called
1711+
:meth:`~DataFrame.reset_index` which transfers the index values into the
1712+
DataFrame's columns and sets a simple integer index.
17131713
This is the inverse operation of :meth:`~DataFrame.set_index`.
17141714

17151715

0 commit comments

Comments
 (0)