Skip to content

Commit 93586ff

Browse files
Giftlinjreback
authored andcommitted
MultiIndex Doc (pandas-dev#18169)
1 parent c8aad92 commit 93586ff

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/source/advanced.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ on a deeper level.
174174
Defined Levels
175175
~~~~~~~~~~~~~~
176176

177-
The repr of a ``MultiIndex`` shows ALL the defined levels of an index, even
177+
The repr of a ``MultiIndex`` shows all the defined levels of an index, even
178178
if the they are not actually used. When slicing an index, you may notice this.
179179
For example:
180180

181181
.. ipython:: python
182182
183-
# original multi-index
184-
df.columns
183+
  # original MultiIndex
184+
  df.columns
185185
186186
# sliced
187187
df[['foo','qux']].columns
@@ -264,7 +264,7 @@ Passing a list of labels or tuples works similar to reindexing:
264264
Using slicers
265265
~~~~~~~~~~~~~
266266

267-
You can slice a multi-index by providing multiple indexers.
267+
You can slice a ``MultiIndex`` by providing multiple indexers.
268268

269269
You can provide any of the selectors as if you are indexing by label, see :ref:`Selection by Label <indexing.label>`,
270270
including slices, lists of labels, labels, and boolean indexers.
@@ -278,16 +278,16 @@ As usual, **both sides** of the slicers are included as this is label indexing.
278278

279279
You should specify all axes in the ``.loc`` specifier, meaning the indexer for the **index** and
280280
for the **columns**. There are some ambiguous cases where the passed indexer could be mis-interpreted
281-
as indexing *both* axes, rather than into say the MuliIndex for the rows.
281+
  as indexing *both* axes, rather than into say the ``MultiIndex`` for the rows.
282282

283283
You should do this:
284284

285285
.. code-block:: python
286286
287287
df.loc[(slice('A1','A3'),.....), :]
288288
289-
rather than this:
290-
289+
  rather than this:
290+
 
291291
.. code-block:: python
292292
293293
df.loc[(slice('A1','A3'),.....)]
@@ -494,7 +494,7 @@ are named.
494494
s.sort_index(level='L2')
495495
496496
On higher dimensional objects, you can sort any of the other axes by level if
497-
they have a MultiIndex:
497+
they have a ``MultiIndex``:
498498

499499
.. ipython:: python
500500

0 commit comments

Comments
 (0)