-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Open
Labels
EnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
There currently is no elegant pattern to drop duplicate indices.
I think what people usually do is
df[~df.index.duplicated(keep='first')]
Feature Description
Add a new parameter to drop_duplicates
to specify dropping duplicate indices.
An option could be a index=True
to do this, similar to when merging on an index.
Alternative Solutions
Allow the subset
parameter of drop_duplicates
to accept the name of the index.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
EnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action