Series.mask should accept same arguments as Series.where · Issue #8801 · pandas-dev/pandas (original) (raw)
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.