Skip to content

Commit 17209f3

Browse files
committed
BUG: support indexing MultiIndex with 1-D array
closes #15434
1 parent 7606114 commit 17209f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/indexing.py

+2
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,8 @@ def _getitem_axis(self, key, axis=0):
15371537
raise NotImplementedError("Indexing a MultiIndex with a "
15381538
"multidimensional key is not "
15391539
"implemented")
1540+
elif isinstance(key, np.ndarray):
1541+
key = key.tolist()
15401542
if (not isinstance(key, tuple) and len(key) > 1 and
15411543
not isinstance(key[0], tuple)):
15421544
key = tuple([key])

0 commit comments

Comments
 (0)