Mi indexing by toobaz · Pull Request #15425 · pandas-dev/pandas (original) (raw)

Ouch, right. I caught #15424 while trying to index with a DataFrame and getting a KeyError: 0, this led me to think it was a bug and not a missing feature, sorry.

That said, I would love that feature. I understand the "complexity" argument, but I propose to reason backwards: if we don't want the column names to align on the level names, then there's no complexity added - it's already done (and really, DataFrames become tuples so early that you don't have to special-case anything else). If instead we want this to happen, I will see what I can do.

Concerning this PR: in the first case, I would just add a whatsnew section, while in the second, I would drop the two incriminated lines (and the related test).