Skip to content

Commit 34647a8

Browse files
committed
Hack to preserve behavior of #21309
1 parent 2c23c2a commit 34647a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/frame.py

+4
Original file line numberDiff line numberDiff line change
@@ -2663,6 +2663,10 @@ def _ixs(self, i, axis=0):
26632663
def __getitem__(self, key):
26642664
key = com._apply_if_callable(key, self)
26652665

2666+
# remove following two lines when a decision is taken on #21309:
2667+
if isinstance(self.columns, MultiIndex) and not self.columns.is_unique:
2668+
return self._getitem_multilevel(key)
2669+
26662670
# shortcut if we are an actual column
26672671
try:
26682672
return self._getitem_column(key)

0 commit comments

Comments
 (0)