You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So doing df.index.B looks simple and generally it is, however there are some edge cases that make this untenable:
df.index['B'] needs to work similarly for a smooth user xp, however this is in direct conflict with positional access on a single level for a regular Index and on a MI:
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: