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.
MultiIndex-based indexing in pandas
How to get the number of the most frequent value in a column?
Using pandas.ols on multiple dependent variables at once
Insert 0-values for missing dates within MultiIndex
pandas access axis by user-defined name
Trouble with groupss and aggregation
Replace MultiIndex's contents with DataFrame columns
What's the `DataFrameGroupBy`-equivalent of `dict.keys`?
How to split a dataframe according to a boolean criterion?
Pandas Rolling Computations on Sliding Windows (Unevenly spaced)
Resampling Minute data
How to get the last n row of pandas dataframe?
Resample time series in pandas to a weekly interval
Suppress output of object when plotting in ipython
qtconsole not rendering pandas dataframes as html notebook_repr_html option