tabsdata.tableframe.expr.expr.Expr.mod#

Expr.mod(other: Any) Expr[source]#

Modulus operator.

Parameters:

other – The value to divide by.

Example:

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("val"), td.col("val").mod(5).alias("mod"))
>>>
┌──────┬──────┐
│ val  ┆ mod  │
│ ---  ┆ ---  │
│ i64  ┆ i64  │
╞══════╪══════╡
│ 1    ┆ 1    │
│ 15   ┆ 0    │
│ 18   ┆ 3    │
│ null ┆ null │
└──────┴──────┘