Skip to content

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

Closed
@sinhrks

Description

@sinhrks
Member

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.

Activity

added this to the 0.19.0 milestone on Aug 13, 2016
modified the milestones: Next Major Release, 0.19.0 on Aug 15, 2016
removed this from the Contributions Welcome milestone on Oct 13, 2022
jbrockmendel

jbrockmendel commented on Feb 12, 2023

@jbrockmendel
Member

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

mroeschke

mroeschke commented on Mar 29, 2023

@mroeschke
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closing CandidateMay be closeable, needs more eyeballsEnhancementMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jorisvandenbossche@sinhrks@jbrockmendel@mroeschke

        Issue actions

          API: Add Series/Index.unique(dropna=True) · Issue #13984 · pandas-dev/pandas