-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsEnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionduplicatedduplicated, drop_duplicatesduplicated, drop_duplicates
Description
Feature Type
-
Adding new functionality to pandas
-
Changing existing functionality in pandas
-
Removing existing functionality in pandas
Problem Description
I suggest adding options first_inverted
and last_inverted
as keep
options to function pandas.DataFrame.duplicated
. Below an example of how it would work and what it would return.
df = pd.DataFrame({
'brand': ['Yum Yum', 'Yum Yum', 'Yum Yum', 'Indomie', 'Indomie', 'Indomie'],
'style': ['cup', 'cup', 'cup', 'cup', 'pack', 'pack'],
'rating': [4, 4, 4, 3.5, 15, 5],
})
df.duplicated(keep='first_inverted')
0 True
1 False
2 False
3 False
4 False
5 False
dtype: bool
Feature Description
.
Alternative Solutions
.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsEnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionduplicatedduplicated, drop_duplicatesduplicated, drop_duplicates