Reputation: 81
I want drop records that have duplicates and their duplicates in pandas Dataframe based on a column
Upvotes: 0
Views: 537
Reputation: 855
df.drop_duplicates(subset='column_name',keep=False)
drop_duplicates
will drop duplicated
subset
will allow you the specify based on which column you want to determine duplicated
keep
will allow you to specify which record to keep or drop.
drop_duplicates : Please check this link for more info.
Upvotes: 1