eland.Series.sub#
- Series.sub(right: Series) Series #
返回 series 和 right 的减法,按元素计算(二元运算符 sub)。
参数#
right: eland.Series
返回值#
eland.Series
示例#
>>> df = ed.DataFrame('http://localhost:9200', '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 >>> df.total_quantity 0 2 1 2 2 2 3 2 4 2 Name: total_quantity, dtype: int64 >>> df.taxful_total_price - df.total_quantity 0 34.980000 1 51.980000 2 197.979996 3 172.979996 4 78.980003 dtype: float64