@@ -584,45 +584,13 @@ without using a temporary variable.
584
584
(bb.groupby([' year' , ' team' ]).sum()
585
585
.loc[lambda df : df[' r' ] > 100 ])
586
586
587
- .. _indexing.deprecate_ix :
588
587
589
- IX indexer is deprecated
590
- ------------------------
591
-
592
- .. warning ::
593
-
594
- .. versionchanged :: 1.0.0
595
-
596
- The ``.ix `` indexer was removed, in favor of the more strict ``.iloc `` and ``.loc `` indexers.
597
-
598
- ``.ix `` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix `` can decide
599
- to index *positionally * OR via *labels * depending on the data type of the index. This has caused quite a
600
- bit of user confusion over the years.
601
-
602
- The recommended methods of indexing are:
603
-
604
- * ``.loc `` if you want to *label * index.
605
- * ``.iloc `` if you want to *positionally * index.
606
-
607
- .. ipython :: python
608
-
609
- dfd = pd.DataFrame({' A' : [1 , 2 , 3 ],
610
- ' B' : [4 , 5 , 6 ]},
611
- index = list (' abc' ))
612
-
613
- dfd
614
-
615
- Previous behavior, where you wish to get the 0th and the 2nd elements from the index in the 'A' column.
616
-
617
- .. code-block :: ipython
588
+ .. _combining_positional_and_label_based_indexing :
618
589
619
- In [3]: dfd.ix[[0, 2], 'A']
620
- Out[3]:
621
- a 1
622
- c 3
623
- Name: A, dtype: int64
590
+ Combining positional and label-based indexing
591
+ ---------------------------------------------
624
592
625
- Using `` .loc ``. Here we will select the appropriate indexes from the index, then use * label * indexing.
593
+ If you wish to get the 0th and the 2nd elements from the index in the 'A' column, you can do:
626
594
627
595
.. ipython :: python
628
596
0 commit comments