We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f151dba commit 1a37e0eCopy full SHA for 1a37e0e
pandas/core/generic.py
@@ -16,6 +16,7 @@
16
ClassVar,
17
Literal,
18
NoReturn,
19
+ Sequence,
20
cast,
21
final,
22
overload,
@@ -4126,9 +4127,10 @@ class animal locomotion
4126
4127
index = self.index
4128
4129
if isinstance(index, MultiIndex):
4130
+ level = range(len(key)) if isinstance(key, Sequence) else 0
4131
loc, new_index = index.get_loc_level(
4132
key,
- level=range(len(key)),
4133
+ level=level,
4134
drop_level=drop_level
4135
)
4136
if not drop_level:
0 commit comments