Skip to content

[pandas-vet] Constant column check with nunique #5588

@sbrugman

Description

@sbrugman

Newly proposed upstream rule: constant column check with nunique

series.nunique() == 1

Rather use (in the absence of nans):

v = series.values
(v[0] == v).all()

See deppen8/pandas-vet#119

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionAwaiting a decision from a maintainerruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions