Pandas option to keep levels after xs operation
Is there a way to perform a cross-section on a hierarchical dataframe that returns the dataframe without the searched levels being dropped? That is, if you have a dataframe with index.names = ['month','year'] and perform the following command newdf = df.xs(('January'),level=('month')) such that the new dataframe retains the month index?
It seems that drop_level kwarg has been added to version 0.13 for this exact purpose.
rename columns function not working in pandas
Number format column with pandas.DataFrame.to_csv()?
Matplotlib Subplot Labels Disappear
Counting rows between dates in pandas with groupby
Taking second last observed row
retrieve data from pandas dataframe if it doesn't cooccur in previous column
pandas resample MAX-VALUE with corresponding ANGLE-VALUE
Performance issues with writing data to HDFStore
Finding same value index of pandas Series
Get Maximum Value from Dataframe
Slicing in group by function
Grouping factors in python patsy
pandas Series groupby col not found
Annotate labels in pandas scatter plot
Arithmetic in pandas HDF5 queries
Exception appending DataFrame chunk with string values to large HDF5 file using pandas