-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
KeyError when retrieving columns with lists of incomplete tuples from MultiIndex #12369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
you have to use multiindex slicers if you want partial selections
|
(I just thought the above would be expected to work fine, but |
So this neither is a bug, right?
(it is interpreting the "20" as index rather than label)
|
they both should prob raise KeyError might be non trivial to fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry in advance if this was already reported - I searched a bit but didn't know exactly what to search.
Notice that
df[[c[0] for c in cols]]
works just fine... but still we probably want to consider as valid a list of valid keys.The text was updated successfully, but these errors were encountered: