Series.rsubtract

Series.rsubtract(left: Series) Series

Return subtraction of series and left, element-wise (binary operator sub).

Parameters

left: opensearch_py_ml.Series

Returns

opensearch_py_ml.Series

Examples

>>> from tests import OPENSEARCH_TEST_CLIENT
>>> df = oml.DataFrame(OPENSEARCH_TEST_CLIENT, 'ecommerce').head(5)
>>> df.taxful_total_price
0     36.98
1     53.98
2    199.98
3    174.98
4     80.98
Name: taxful_total_price, dtype: float64
>>> 1.0 - df.taxful_total_price
0    -35.980000
1    -52.980000
2   -198.979996
3   -173.979996
4    -79.980003
Name: taxful_total_price, dtype: float64