Skip to content
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

ENH: Add ignore_index to Series.drop_duplicates #48304

Closed
1 of 3 tasks
mroeschke opened this issue Aug 29, 2022 · 1 comment · Fixed by #50844
Closed
1 of 3 tasks

ENH: Add ignore_index to Series.drop_duplicates #48304

mroeschke opened this issue Aug 29, 2022 · 1 comment · Fixed by #50844
Labels
API - Consistency Internal Consistency of API/Behavior duplicated duplicated, drop_duplicates Enhancement

Comments

@mroeschke
Copy link
Member

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

Appears in 1.0, DataFrame.drop_duplicates gained ignore_index: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html#pandas.DataFrame.drop_duplicates

Motivating issue: #30114
xref: #31725

For API consistency, Series.drop_duplicates should have an ignore_index argument too to perform a reset_index(drop=False)

Feature Description

Probably similar to #30405

Alternative Solutions

Users can just call reset_index(drop=True).

Additional Context

No response

@mroeschke mroeschke added Enhancement duplicated duplicated, drop_duplicates API - Consistency Internal Consistency of API/Behavior labels Aug 29, 2022
lukaskuhn-lku added a commit to lukaskuhn-lku/pandas that referenced this issue Sep 4, 2022
@kostyafarber
Copy link
Contributor

kostyafarber commented Dec 18, 2022

Can this be closed now?

EDIT: a PR can be opened against this from the above commit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior duplicated duplicated, drop_duplicates Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants