maxframe.liteframe.LiteFrame.mask#
- LiteFrame.mask(cond, other=nan)#
Replace values where cond is True with other.
Equivalent to
pandas.DataFrame.mask: replace original values where cond is True with other, keep where False.- Parameters:
- Return type:
See also
Examples
>>> import maxframe.liteframe as mlf >>> lf = mlf.LiteFrame({'a': [1, 2, 3]}) >>> result = lf.mask(lf > 2, 0) >>> result.execute() a 0 1 1 2 2 0