Skip to content

pd.Series.sub

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

Supported Arguments

argument datatypes
other
  • numeric scalar
  • array with numeric data
  • Series with numeric data
fill_value numeric scalar

Note

Series.sub is only supported on Series of numeric data.

Example Usage

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