Skip to main content
Version: 0.9.5

Expr.sub

def sub(other: Any) -> Expr

Categories: numeric

Equivalent to the - operator.

Parameters

parameter
other

value to subtract.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("val"), td.col("val").sub(1).alias("sub"))
>>>
┌──────┬──────────┐
│ val ┆ sub │
------
│ i64 ┆ i64 │
╞══════╪══════════╡
10
1514
1817
6059
6059
7574
│ null ┆ null │
└──────┴──────────┘