What do you guys think about a DataFrame.drop_consecutive_duplicates? #4543
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
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.
The text was updated successfully, but these errors were encountered: