File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2534,14 +2534,13 @@ def _get_level_values(self, level):
2534
2534
Parameters
2535
2535
----------
2536
2536
level : int or str
2537
- ``level`` is either the integer position of the level in the
2537
+ ``level`` is either the integer position of the level in the
2538
2538
MultiIndex, or the name of the level.
2539
2539
2540
2540
Returns
2541
2541
-------
2542
2542
values : Index
2543
- Because there is only one level when the index has one level,
2544
- the return value is always self in this case.
2543
+ ``self``, as there is only one level in the Index.
2545
2544
2546
2545
See also
2547
2546
---------
Original file line number Diff line number Diff line change @@ -893,6 +893,8 @@ def get_level_values(self, level):
893
893
Returns
894
894
-------
895
895
values : Index
896
+ ``values`` is a level of this MultiIndex converted to
897
+ a single :class:`Index` (or subclass thereof).
896
898
897
899
Examples
898
900
---------
Original file line number Diff line number Diff line change @@ -1438,7 +1438,7 @@ def test_get_level_values(self):
1438
1438
result = self .strIndex .get_level_values (0 )
1439
1439
tm .assert_index_equal (result , self .strIndex )
1440
1440
1441
- # GH 17414
1441
+ # test for name ( GH 17414)
1442
1442
index_with_name = self .strIndex .copy ()
1443
1443
index_with_name .name = 'a'
1444
1444
result = index_with_name .get_level_values ('a' )
You can’t perform that action at this time.
0 commit comments