@@ -230,7 +230,7 @@ of tuples:
230230Advanced indexing with hierarchical index
231231-----------------------------------------
232232
233- Syntactically integrating ``MultiIndex `` in advanced indexing with ``.loc/.ix `` is a
233+ Syntactically integrating ``MultiIndex `` in advanced indexing with ``.loc `` is a
234234bit challenging, but we've made every effort to do so. for example the
235235following works as you would expect:
236236
@@ -258,7 +258,7 @@ Passing a list of labels or tuples works similar to reindexing:
258258
259259.. ipython :: python
260260
261- df.ix [[(' bar' , ' two' ), (' qux' , ' one' )]]
261+ df.loc [[(' bar' , ' two' ), (' qux' , ' one' )]]
262262
263263 .. _advanced.mi_slicers :
264264
@@ -604,7 +604,7 @@ intended to work on boolean indices and may return unexpected results.
604604
605605 ser = pd.Series(np.random.randn(10 ))
606606 ser.take([False , False , True , True ])
607- ser.ix [[0 , 1 ]]
607+ ser.iloc [[0 , 1 ]]
608608
609609 Finally, as a small note on performance, because the ``take `` method handles
610610a narrower range of inputs, it can offer performance that is a good deal
@@ -620,7 +620,7 @@ faster than fancy indexing.
620620 timeit arr.take(indexer, axis=0)
621621
622622 ser = pd.Series(arr[:, 0])
623- timeit ser.ix [indexer]
623+ timeit ser.iloc [indexer]
624624 timeit ser.take(indexer)
625625
626626.. _indexing.index_types :
@@ -661,7 +661,7 @@ Setting the index, will create create a ``CategoricalIndex``
661661 df2 = df.set_index(' B' )
662662 df2.index
663663
664- Indexing with ``__getitem__/.iloc/.loc/.ix `` works similarly to an ``Index `` with duplicates.
664+ Indexing with ``__getitem__/.iloc/.loc `` works similarly to an ``Index `` with duplicates.
665665The indexers MUST be in the category or the operation will raise.
666666
667667.. ipython :: python
@@ -759,14 +759,12 @@ same.
759759 sf = pd.Series(range (5 ), index = indexf)
760760 sf
761761
762- Scalar selection for `` [],.ix,. loc`` will always be label based. An integer will match an equal float index (e.g. `` 3 `` is equivalent to `` 3.0 `` )
762+ Scalar selection for `` [],.loc`` will always be label based. An integer will match an equal float index (e.g. `` 3 `` is equivalent to `` 3.0 `` )
763763
764764.. ipython:: python
765765
766766 sf[3 ]
767767 sf[3.0 ]
768- sf.ix[3 ]
769- sf.ix[3.0 ]
770768 sf.loc[3 ]
771769 sf.loc[3.0 ]
772770
@@ -783,7 +781,6 @@ Slicing is ALWAYS on the values of the index, for ``[],ix,loc`` and ALWAYS posit
783781.. ipython:: python
784782
785783 sf[2 :4 ]
786- sf.ix[2 :4 ]
787784 sf.loc[2 :4 ]
788785 sf.iloc[2 :4 ]
789786
@@ -813,14 +810,6 @@ In non-float indexes, slicing using floats will raise a ``TypeError``
813810 In [3 ]: pd.Series(range (5 )).iloc[3.0 ]
814811 TypeError : cannot do positional indexing on < class ' pandas.indexes.range.RangeIndex' > with these indexers [3.0 ] of < type ' float' >
815812
816- Further the treatment of `` .ix`` with a float indexer on a non- float index, will be label based, and thus coerce the index.
817-
818- .. ipython:: python
819-
820- s2 = pd.Series([1 , 2 , 3 ], index = list (' abc' ))
821- s2
822- s2.ix[1.0 ] = 10
823- s2
824813
825814Here is a typical use- case for using this type of indexing. Imagine that you have a somewhat
826815irregular timedelta- like indexing scheme, but the data is recorded as floats. This could for
0 commit comments