Skip to content

Commit 5cc98ea

Browse files
committed
DOC: small change in .ix deprecation docs
1 parent 8f86c3f commit 5cc98ea

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

doc/source/indexing.rst

+9-4
Original file line numberDiff line numberDiff line change
@@ -557,13 +557,18 @@ IX Indexer is Deprecated
557557

558558
.. warning::
559559

560-
Starting in 0.20.0, the ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc``
561-
and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to
562-
do. To wit, ``.ix`` can decide to index *positionally* OR via *labels*. This has caused
563-
quite a bit of user confusion over the years.
560+
Starting in 0.20.0, the ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc``
561+
and ``.loc`` indexers.
562+
563+
``.ix`` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix`` can decide
564+
to index *positionally* OR via *labels* depending on the data type of the index. This has caused quite a
565+
bit of user confusion over the years.
564566

565567
The recommended methods of indexing are:
566568

569+
- ``.loc`` if you want to *label* index
570+
- ``.iloc`` if you want to *positionally* index.
571+
567572
.. ipython:: python
568573
569574
dfd = pd.DataFrame({'A': [1, 2, 3],

doc/source/whatsnew/v0.20.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Backwards incompatible API changes
149149
Deprecate .ix
150150
^^^^^^^^^^^^^
151151

152-
The ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc`` and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix`` can decide to index *positionally* OR via *labels*. This has caused quite a bit of user confusion over the years. The full indexing documentation are :ref:`here <indexing>`. (:issue:`14218`)
152+
The ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc`` and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix`` can decide to index *positionally* OR via *labels*, depending on the data type of the index. This has caused quite a bit of user confusion over the years. The full indexing documentation are :ref:`here <indexing>`. (:issue:`14218`)
153153

154154

155155
The recommended methods of indexing are:

0 commit comments

Comments
 (0)