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

API: Add Series/Index.unique(dropna=True) #13984

Closed
sinhrks opened this issue Aug 13, 2016 · 2 comments
Closed

API: Add Series/Index.unique(dropna=True) #13984

sinhrks opened this issue Aug 13, 2016 · 2 comments
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments

@sinhrks
Copy link
Member

sinhrks commented Aug 13, 2016

Series/Index.nunique has dropna kw to exclude NaN. Add the same kw to .unique also.

As #13979 changes .unique to always return Index, we can replace Index._get_unique_index(dropna) if this option is added.

@sinhrks sinhrks added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate API Design labels Aug 13, 2016
@sinhrks sinhrks added this to the 0.19.0 milestone Aug 13, 2016
@jorisvandenbossche jorisvandenbossche modified the milestones: Next Major Release, 0.19.0 Aug 15, 2016
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@jbrockmendel
Copy link
Member

Why isn't obj.unique().dropna() not good enough?

@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Feb 12, 2023
@mroeschke
Copy link
Member

Yeah agreed calling dropna should be sufficient. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

No branches or pull requests

4 participants