Skip to content

Commit 2cee878

Browse files
committed
pandas-dev#48188 FIX: previous commit broke old else if logic
1 parent fc5fe33 commit 2cee878

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/indexing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1734,13 +1734,13 @@ def _getitem_axis(self, key, axis: AxisInt):
17341734
if isinstance(key, list):
17351735
key = np.asarray(key)
17361736

1737+
if type(key) is tuple or (hasattr(key, "_fields") and isinstance(key, type(key))):
1738+
return self.__getitem__(tuple(key))
1739+
17371740
if com.is_bool_indexer(key):
17381741
self._validate_key(key, axis)
17391742
return self._getbool_axis(key, axis=axis)
17401743

1741-
if type(key) is tuple or (hasattr(key, "_fields") and isinstance(key, type(key))):
1742-
return self.__getitem__(tuple(key))
1743-
17441744
# a list of integers
17451745
elif is_list_like_indexer(key):
17461746
return self._get_list_axis(key, axis=axis)

0 commit comments

Comments
 (0)