@@ -174,14 +174,14 @@ on a deeper level.
174
174
Defined Levels
175
175
~~~~~~~~~~~~~~
176
176
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
178
178
if the they are not actually used. When slicing an index, you may notice this.
179
179
For example:
180
180
181
181
.. ipython :: python
182
182
183
- # original multi-index
184
- df.columns
183
+ # original MultiIndex
184
+ df.columns
185
185
186
186
# sliced
187
187
df[[' foo' ,' qux' ]].columns
@@ -264,7 +264,7 @@ Passing a list of labels or tuples works similar to reindexing:
264
264
Using slicers
265
265
~~~~~~~~~~~~~
266
266
267
- You can slice a multi-index by providing multiple indexers.
267
+ You can slice a `` MultiIndex `` by providing multiple indexers.
268
268
269
269
You can provide any of the selectors as if you are indexing by label, see :ref: `Selection by Label <indexing.label >`,
270
270
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.
278
278
279
279
You should specify all axes in the ``.loc `` specifier, meaning the indexer for the **index ** and
280
280
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.
282
282
283
283
You should do this:
284
284
285
285
.. code-block :: python
286
286
287
287
df.loc[(slice (' A1' ,' A3' ),... ..), :]
288
288
289
- rather than this:
290
-
289
+ rather than this:
290
+
291
291
.. code-block :: python
292
292
293
293
df.loc[(slice (' A1' ,' A3' ),... ..)]
@@ -494,7 +494,7 @@ are named.
494
494
s.sort_index(level = ' L2' )
495
495
496
496
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 `` :
498
498
499
499
.. ipython :: python
500
500
0 commit comments