Skip to content

BUG: Series([pd.NA, np.nan], dtype="Float64").nunique() should return 0? #54876

Open
@mroeschke

Description

@mroeschke

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

In [22]: import pandas as pd; import numpy as np

In [23]: (pd.Series([np.nan, 0], dtype="Float64") / 0).nunique()
Out[23]: 1

Issue Description

The docs not that Excludes NA values by default.; therefore, should the result be 0?

Expected Behavior

Returns 0?

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatePDEP missing valuesIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions