Skip to content

What do you guys think about a DataFrame.drop_consecutive_duplicates? #4543

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
numpand opened this issue Aug 12, 2013 · 4 comments
Closed

What do you guys think about a DataFrame.drop_consecutive_duplicates? #4543

numpand opened this issue Aug 12, 2013 · 4 comments
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff API Design Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments

@numpand
Copy link

numpand commented Aug 12, 2013

It would work similar to drop_duplicates (same interface), but would only remove consecutive duplicates (like Unix's uniq does). So to in order to remove all duplicates with this function, the DataFrame would need to be sorted by the same criteria. This function can be useful when order is important and non-consecutive duplicates convey useful information.

@cpcloud
Copy link
Member

cpcloud commented Aug 12, 2013

if the interface is the same why not just add a keyword argument rather than another method?

@numpand
Copy link
Author

numpand commented Aug 12, 2013

Keyword argument would work fine. I just meant the actual functionality.

@jreback jreback modified the milestones: 0.15.0, 0.14.0 Feb 18, 2014
@tvyomkesh
Copy link
Contributor

I think I can submit a PR for this one if it is not being looked into by anyone else.

@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@sinhrks
Copy link
Member

sinhrks commented Jul 19, 2016

dupe with #10540

@sinhrks sinhrks closed this as completed Jul 19, 2016
@jorisvandenbossche jorisvandenbossche modified the milestones: No action, Next Major Release Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff API Design Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

No branches or pull requests

6 participants