Skip to main content
Version: 1.8.0

Expr.add

def add(other: Any) -> Expr

Categories: numeric

Equivalent to the + operator.

For numeric types adds the given input. For string types concatenates the given input.

Parameters

parameter
other

The value to add or concatenate.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("val"), td.col("val").add(1).alias("add"))
>>>
┌──────┬──────────┐
│ val ┆ add │
------
│ i64 ┆ i64 │
╞══════╪══════════╡
12
1516
1819
6061
6061
7576
│ null ┆ null │
└──────┴──────────┘