-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Feature request: Access multiindex by name #14152
Comments
Related issue / possibly duplicate: #10816 |
this is the idiom, which is not bad actually.
Returning a list is non-performant / not-idiomatic. |
Nice! I missed that idiom. But, still, is there any reason that:
is not a shortcut for |
So doing
You might think that is ok, until you realize that 0 also could mean level=0. Then what do you do? |
Code Sample, a copy-pastable example if possible
I have not found an easy way to access a column of a multi index by name. Consider the following code:
To access the values of column B i can e.g. do:
or
Both of there are somewhat cumbersome What I'm proposing is to add similar shorcut access to a multiindex just like a dataframe. E.g.
or
that would return the same list as in the two examples above.
output of
pd.show_versions()
0.18.1
The text was updated successfully, but these errors were encountered: