@@ -139,8 +139,6 @@ def _get_label(self, label, axis=None):
139
139
# but will fail when the index is not present
140
140
# see GH5667
141
141
return self .obj ._xs (label , axis = axis )
142
- elif isinstance (label , tuple ) and isinstance (label [axis ], slice ):
143
- raise IndexingError ('no slices here, handle elsewhere' )
144
142
145
143
return self .obj ._xs (label , axis = axis )
146
144
@@ -976,11 +974,11 @@ def _getitem_lowerdim(self, tup):
976
974
if self ._is_nested_tuple_indexer (tup ):
977
975
return self ._getitem_nested_tuple (tup )
978
976
979
- # we maybe be using a tuple to represent multiple dimensions here
977
+ # A tuple is maybe a valid label (e.g. in a MultiIndex)
980
978
ax0 = self .obj ._get_axis (0 )
981
979
# ...but iloc should handle the tuple as simple integer-location
982
- # instead of checking it as multiindex representation (GH 13797)
983
- if isinstance ( ax0 , MultiIndex ) and self .name != 'iloc' :
980
+ # instead (GH 13797)
981
+ if self .name != 'iloc' :
984
982
result = self ._handle_lowerdim_multi_index_axis0 (tup )
985
983
if result is not None :
986
984
return result
@@ -1877,7 +1875,7 @@ def _getitem_axis(self, key, axis=None):
1877
1875
return self ._get_slice_axis (key , axis = axis )
1878
1876
elif com .is_bool_indexer (key ):
1879
1877
return self ._getbool_axis (key , axis = axis )
1880
- elif is_list_like_indexer (key ):
1878
+ elif is_list_like_indexer (key ) and not isinstance ( key , tuple ) :
1881
1879
1882
1880
# convert various list-like indexers
1883
1881
# to a list of keys
0 commit comments