Skip to main content
Version: 1.9.1

Expr.mod

def mod(other: Any) -> Expr

Categories: numeric

Modulus operator.

Parameters

parameter
other

The value to divide by.

Examples

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