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 1d92c77 commit e607c34Copy full SHA for e607c34
pandas/core/indexing.py
@@ -24,7 +24,7 @@
24
from pandas.core.dtypes.missing import _infer_fill_value, isna
25
26
import pandas.core.common as com
27
-from pandas.core.index import Index, MultiIndex
+from pandas.core.index import Index, InvalidIndexError, MultiIndex
28
29
30
# the supported indexers
@@ -118,7 +118,7 @@ def __getitem__(self, key):
118
key = tuple(com.apply_if_callable(x, self.obj) for x in key)
119
try:
120
values = self.obj._get_value(*key)
121
- except (KeyError, TypeError):
+ except (KeyError, TypeError, InvalidIndexError):
122
# TypeError occurs here if the key has non-hashable entries,
123
# generally slice or list.
124
# TODO(ix): most/all of the TypeError cases here are for ix,
0 commit comments