We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 415e43b commit 634a41fCopy full SHA for 634a41f
pandas/core/indexing.py
@@ -755,18 +755,11 @@ def _getitem_lowerdim(self, tup: Tuple):
755
new_key = tup[:i] + (_NS,) + tup[i + 1 :]
756
757
else:
758
+ # Note: the section.ndim == self.ndim check above
759
+ # rules out having DataFrame here, so we dont need to worry
760
+ # about transposing.
761
new_key = tup[:i] + tup[i + 1 :]
762
- # unfortunately need an odious kludge here because of
- # DataFrame transposing convention
- if (
763
- isinstance(section, ABCDataFrame)
764
- and i > 0
765
- and len(new_key) == 2
766
- ):
767
- a, b = new_key
768
- new_key = b, a
769
-
770
if len(new_key) == 1:
771
new_key = new_key[0]
772
0 commit comments