Skip to content

[DOC]: Improve doc of index.drop #36255

New issue

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

Closed
wants to merge 1 commit into from
Closed

Conversation

phofl
Copy link
Member

@phofl phofl commented Sep 9, 2020

@dsaxton dsaxton added the Docs label Sep 9, 2020
@@ -4093,7 +4093,8 @@ def drop(
Remove rows or columns by specifying label names and corresponding
axis, or by specifying directly index or column names. When using a
multi-index, labels on different levels can be removed by specifying
the level.
the level. However the multi-index keeps these levels even if they
are not used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be ambiguous for readers who dont know the difference between levels vs codes. Maybe "The now-unused levels remain in the MultiIndex._levels attribute"?

@jbrockmendel
Copy link
Member

Can this be closed in favor of #36300?

@phofl
Copy link
Member Author

phofl commented Sep 23, 2020

Could merge this together.

@phofl
Copy link
Member Author

phofl commented Sep 23, 2020

Added to #36300

@phofl phofl closed this Sep 23, 2020
@phofl phofl deleted the 36227 branch September 23, 2020 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: using df.drop(labels=x, level='level_name') does not update df.index.levels
3 participants