Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
maxgrenderjones opened this issue Nov 13, 2014 · 1 comment · Fixed by #9808
Closed

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

maxgrenderjones opened this issue Nov 13, 2014 · 1 comment · Fixed by #9808
Labels
API Design Compat pandas objects compatability with Numpy or Python functions
Milestone

Comments

@maxgrenderjones
Copy link
Contributor

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.

@jreback jreback added API Design Compat pandas objects compatability with Numpy or Python functions labels Nov 13, 2014
@jreback jreback added this to the 0.16.0 milestone Nov 13, 2014
@jreback
Copy link
Contributor

jreback commented Nov 13, 2014

sure, care to do a pull-request for this?

@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@jreback jreback modified the milestones: 0.16.1, Next Major Release Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants