Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
BUG - sparse dataframes lose multi-index column names #11600
Bug is simple in concept, multi-index with column level names loses those names when going into sparse dataframes.
Minimal example - first create a multi-index dataframe:
This gives us a nice test multi-index with column and row level names. Now if I make a sparse matrix out of that and show it, the column level names are gone.
And if I convert the sparse version back to dense those level names are still gone.
I AM aware that displaying the sparse version calls to_dense() but the loss appears to be happening at the conversion to sparse. I'm exploring moving to sparse to reduce memory usage for a code base and my attempts to access the levels within the sparse dataframe generate "KeyError: 'Level not found'"
http://pandas.pydata.org/pandas-docs/stable/contributing.html for how to contribute