Skip to content

pd.Series.mod

pandas.Series.mod(other, level=None, fill_value=None, axis=0)

支持的参数

参数 数据类型
other
  • 数值标量
  • 具有数值数据的数组
  • 具有数值数据的序列
fill_value 数值标量

注意

Series.mod 仅在数值数据的 Series 上受支持。

示例用法

>>> @bodo.jit
... def f(S, other):
...   return S.mod(other)
>>> S = pd.Series(np.arange(1, 1001))
>>> other = pd.Series(reversed(np.arange(1, 1001)))
>>> f(S, other)
0      1
1      2
2      3
3      4
4      5
      ..
995    1
996    1
997    2
998    1
999    0
Length: 1000, dtype: int64