Skip to content

ENH: add .dropinf() and/or .dropna(drop_inf=True) methods #12520

@adrivsh

Description

@adrivsh

There are known ways of droping inf and nan (.replace(np.inf, np.nan).dropna()) but still, the API could be expanded:

.dropinf(inplace=False) 

.dropna(drop_inf = False)

Are both self explanatory wishes and it is no stretch to see how they are usefull.
Note for instance that today's API does not provide a one liner to drop inf in place while keeping nans.

Best

PS: not sure how to submit wishes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNeeds DiscussionRequires discussion from core team before further action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions