We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's a question how to drop levels of the index or columns. SO suggests
http://stackoverflow.com/questions/22233488/pandas-drop-a-level-from-a-multi-level-column-index
What we're doing here is overwriting the index or columns, which seems a little indirect, but I guess it works. In our example, we can do this with
ddi.index = ddi.index.droplevel(level='ISO') ddt = ddi.T ddt.columns = ddt.columns.droplevel(level='Units')
There's also a drop method that seems to drop both either rows or columns; eg,
ddi.index = ddi.index.drop('Surplus')
The column version seems to do the same thing as drop applied to a df, which seems more direct to me.
The text was updated successfully, but these errors were encountered:
Add sort_index to the list. Critical for speed, as the pink warning suggests.
sort_index
Sorry, something went wrong.
No branches or pull requests
There's a question how to drop levels of the index or columns. SO suggests
http://stackoverflow.com/questions/22233488/pandas-drop-a-level-from-a-multi-level-column-index
What we're doing here is overwriting the index or columns, which seems a little indirect, but I guess it works. In our example, we can do this with
There's also a drop method that seems to drop both either rows or columns; eg,
The column version seems to do the same thing as drop applied to a df, which seems more direct to me.
The text was updated successfully, but these errors were encountered: