Skip to content

Series.mask should accept same arguments as Series.where #8801

Closed
@maxgrenderjones

Description

@maxgrenderjones

Series.mask just performs a mask operation. Series.where accepts substitute values. (In the meantime, workaround is simple - just invert the where selection).

Version 0.15.1 docs:

Series.mask(cond)
     Returns copy whose values are replaced with nan if the inverted condition is True

Series.where(cond, other=nan, inplace=False, axis=None, level=None, try_cast=False, raise_on_error=True)
     Return an object of same shape as self and whose corresponding entries are from self where cond is True and otherwise are from other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API DesignCompatpandas objects compatability with Numpy or Python functions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions