Expr.mod
methodView source ↗
def mod(other: Any) -> Expr
Categories: numeric
Modulus operator.
Parameters
parameter
otherThe 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 │
╞══════╪══════╡
│ 1 ┆ 1 │
│ 15 ┆ 0 │
│ 18 ┆ 3 │
│ null ┆ null │
└──────┴──────┘