mars.dataframe.Series.rmul#
- Series.rmul(other, level=None, fill_value=None, axis=0)#
返回系列和其他元素的逐元素乘法(双目运算符 rmul)。
等价于
series * other,但支持在一个输入中替换缺失数据的 fill_value。- Parameters
- Returns
操作的结果。
- Return type
另请参阅
示例
>>> import numpy as np >>> import mars.dataframe as md >>> a = md.Series([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd']) >>> a.execute() a 1.0 b 1.0 c 1.0 d NaN dtype: float64
>>> b = md.Series([1, np.nan, 1, np.nan], index=['a', 'b', 'd', 'e']) >>> b.execute() a 1.0 b NaN d 1.0 e NaN dtype: float64
>>> a.multiply(b, fill_value=0).execute() a 1.0 b 0.0 c 0.0 d 0.0 e NaN dtype: float64