We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4fba9e commit f44aaadCopy full SHA for f44aaad
pandas/core/indexing.py
@@ -902,23 +902,12 @@ def _getitem_tuple(self, tup):
902
return retval
903
904
def _multi_take_opportunity(self, tup):
905
- from pandas.core.generic import NDFrame
906
-
907
- # ugly hack for GH #836
908
- if not isinstance(self.obj, NDFrame):
909
- return False
910
911
if not all(is_list_like_indexer(x) for x in tup):
912
return False
913
914
# just too complicated
915
- for indexer, ax in zip(tup, self.obj._data.axes):
916
- if isinstance(ax, MultiIndex):
917
918
- elif com.is_bool_indexer(indexer):
919
920
- elif not ax.is_unique:
921
+ if any(com.is_bool_indexer(x) for x in tup):
+ return False
922
923
return True
924
0 commit comments