maxframe.liteframe.LiteFrame.rsub#

LiteFrame.rsub(other)#

Reverse element-wise subtraction (other - lf).

Bound to __rsub__, so other - lf is equivalent to lf.rsub(other).

Parameters:

other (scalar, LiteFrame, or column expression) – Value from which each element of lf is subtracted.

Returns:

Lazy frame with element-wise difference of other and lf.

Return type:

LiteFrame

Examples

>>> import maxframe.liteframe as mlf
>>> lf = mlf.LiteFrame({'a': [1, 2]})
>>> result = lf.rsub(10)
>>> result.execute()
   a
0  9
1  8

Using reverse -:

>>> result = 10 - lf
>>> result.execute()
   a
0  9
1  8