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
You can use :class:`pandas.IndexSlice` to facilitate a more natural syntax
352
+
You can use :class:`pandas.IndexSlice` to facilitate a more natural syntax
321
353
using ``:``, rather than using ``slice(None)``.
322
354
323
355
.. ipython:: python
@@ -626,7 +658,7 @@ Index Types
626
658
-----------
627
659
628
660
We have discussed ``MultiIndex`` in the previous sections pretty extensively. ``DatetimeIndex`` and ``PeriodIndex``
629
-
are shown :ref:`here <timeseries.overview>`, and information about
661
+
are shown :ref:`here <timeseries.overview>`, and information about
630
662
`TimedeltaIndex`` is found :ref:`here <timedeltas.timedeltas>`.
631
663
632
664
In the following sub-sections we will highlight some other index types.
@@ -671,9 +703,9 @@ The ``CategoricalIndex`` is **preserved** after indexing:
671
703
672
704
df2.loc['a'].index
673
705
674
-
Sorting the index will sort by the order of the categories (Recall that we
675
-
created the index with ``CategoricalDtype(list('cab'))``, so the sorted
676
-
order is ``cab``.).
706
+
Sorting the index will sort by the order of the categories (recall that we
707
+
created the index with ``CategoricalDtype(list('cab'))``, so the sorted
708
+
order is ``cab``).
677
709
678
710
.. ipython:: python
679
711
@@ -726,7 +758,7 @@ Int64Index and RangeIndex
726
758
727
759
Indexing on an integer-based Index with floats has been clarified in0.18.0, for a summary of the changes, see :ref:`here <whatsnew_0180.float_indexers>`.
728
760
729
-
``Int64Index``is a fundamental basic index in pandas.
761
+
``Int64Index``is a fundamental basic index in pandas.
730
762
This is an Immutable array implementing an ordered, sliceable set.
731
763
Prior to 0.18.0, the ``Int64Index`` would provide the default index forall``NDFrame`` objects.
732
764
@@ -765,7 +797,7 @@ The only positional indexing is via ``iloc``.
765
797
sf.iloc[3]
766
798
767
799
A scalar index that isnot found will raise a ``KeyError``.
768
-
Slicing is primarily on the values of the index when using ``[],ix,loc``, and
800
+
Slicing is primarily on the values of the index when using ``[],ix,loc``, and
769
801
**always** positional when using ``iloc``. The exception is when the sliceis
770
802
boolean, in which case it will always be positional.
0 commit comments