Skip to content

[DOC]: Improve drop docs #36300

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 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4092,8 +4092,11 @@ 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.
MultiIndex, labels on different levels can be removed by specifying
the level. The now-unused levels remain in the
MultiIndex._levels attribute. In case of a MultiIndex either a level
must be defined or the labels must be a list of tuples of the same
length as the number of levels in the MultiIndex.

Parameters
----------
Expand Down
4 changes: 3 additions & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4902,7 +4902,9 @@ def isin(self, values, level=None):

Compute boolean array of whether each index value is found in the
passed set of values. The length of the returned boolean array matches
the length of the index.
the length of the index. If the index is a multi-index and no level is
given, the values must be given as list containing tuples of the same
length as the number of levels in the MultiIndex.

Parameters
----------
Expand Down