Skip to content

DOC: core/generic/drop docs from array-like to list-like #5252

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

Merged
merged 1 commit into from
Oct 17, 2013
Merged
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
5 changes: 2 additions & 3 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def drop(self, labels, axis=0, level=None):

Parameters
----------
labels : array-like
labels : list-like
axis : int
level : int or name, default None
For MultiIndex
Expand All @@ -1103,8 +1103,6 @@ def drop(self, labels, axis=0, level=None):
"""
axis_name = self._get_axis_name(axis)
axis, axis_ = self._get_axis(axis), axis
if not is_list_like(labels):
labels = [ labels ]

if axis.is_unique:
if level is not None:
Expand All @@ -1121,6 +1119,7 @@ def drop(self, labels, axis=0, level=None):
return dropped

else:
labels = com._index_labels_to_array(labels)
if level is not None:
if not isinstance(axis, MultiIndex):
raise AssertionError('axis must be a MultiIndex')
Expand Down