Pandas Series: rmod() function

Modulo of Pandas series and other

The rmod() function is used to get modulo of series and other, element-wise (binary operator rmod).

Equivalent to other % series, but with support to substitute a fill_value for missing data in one of the inputs.


Series.rmod(self, other, level=None, fill_value=None, axis=0)
Pandas Series rmod() function


Name Description Type/Default Value Required / Optional
other   Series or scalar value Required
fill_value Fill existing missing (NaN) values, and any new element needed for successful Series alignment, with this value before computation. If data in both corresponding Series locations is missing the result will be missing. None or float value
Default Value: None (NaN)
level Broadcast across a level, matching Index values on the passed MultiIndex level. int or name Required

Returns: Series
The result of the operation.


Download the above Notebook from here.

Previous: Integer division of Pandas series and other, element-wise
Next: Exponential power of Pandas series