maxframe.dataframe.Series.mul#
- Series.mul(other, level=None, fill_value=None, axis=0)#
返回 Series 和 other 的逐元素相乘结果(二元运算符 mul)。
等价于
series * other,但支持在其中一个输入中缺失数据时使用 fill_value 替代。- 参数:
- 返回:
运算结果。
- 返回类型:
参见
示例
>>> import numpy as np >>> import maxframe.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