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
Dropping rows is removing the values from a multiindex dataframe but not removing the key values from the multiindex. I don't think this is intended behavior. This is pandas 15.1
I noticed this because when I then try to create a panel from from the dataframe I get:
In [40]: panel=df.to_panel()
In [41]: panelOut[41]:
<class'pandas.core.panel.Panel'>Dimensions: 4 (items) x4 (major_axis) x2 (minor_axis)
Itemsaxis: 0to3Major_axisaxis: bartoquxMinor_axisaxis: onetotwo
I also noticed this same behavior when I used query on a multiindex dataframe and then tried to create a panel from the result. Is there a way to get around having to drop extra array from the panel?
The text was updated successfully, but these errors were encountered:
The crux is that its not clear when to rebuild the levels. This has to be a user initiated operation, and currently no 'nice' way to do this, nor even when to do it.
Dropping rows is removing the values from a multiindex dataframe but not removing the key values from the multiindex. I don't think this is intended behavior. This is pandas 15.1
I noticed this because when I then try to create a panel from from the dataframe I get:
I also noticed this same behavior when I used query on a multiindex dataframe and then tried to create a panel from the result. Is there a way to get around having to drop extra array from the panel?
The text was updated successfully, but these errors were encountered: