File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -944,8 +944,9 @@ def _handle_lowerdim_multi_index_axis0(self, tup):
944
944
except TypeError :
945
945
# slices are unhashable
946
946
pass
947
- except KeyError :
948
- return None
947
+ except KeyError as ek :
948
+ if len (tup ) > self .obj .ndim :
949
+ raise ek
949
950
except Exception as e1 :
950
951
if isinstance (tup [0 ], (slice , Index )):
951
952
raise IndexingError ("Handle elsewhere" )
@@ -978,12 +979,7 @@ def _getitem_lowerdim(self, tup):
978
979
return result
979
980
980
981
if len (tup ) > self .obj .ndim :
981
- try :
982
- self ._get_label (tup , axis = self .axis )
983
- except KeyError :
984
- return self ._get_label (tup , axis = self .axis )
985
- except Exception :
986
- raise IndexingError ("Too many indexers. handle elsewhere" )
982
+ raise IndexingError ("Too many indexers. handle elsewhere" )
987
983
988
984
# to avoid wasted computation
989
985
# df.ix[d1:d2, 0] -> columns first (True)
You can’t perform that action at this time.
0 commit comments