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
data.index.get_level_values('foobar') ==42# would like to have data.index['foobar'] == 42
Problem description
Filtering data frame row by one column of multi index is quite common.
Unless I've missed something, the current implementation need get_index_value. It would be nice to have a more direct way to select one MultiIndex column, like we can do with the data frame columns.
Yes, I think it is correct there is currently no other way. Some related isues: #10816 (about easier way to select a single or multiple levels of a MultiIndex) and #8162 (about selecting an index as level as if it would be a column, which could also solve your specific use case)
Code Sample, a copy-pastable example if possible
Problem description
Filtering data frame row by one column of multi index is quite common.
Unless I've missed something, the current implementation need
get_index_value
. It would be nice to have a more direct way to select one MultiIndex column, like we can do with the data frame columns.The text was updated successfully, but these errors were encountered: