tabsdata.tableframe.expr.expr.Expr.truediv#
- Expr.truediv(other: Any) Expr [source]#
Equivalent to the float / operator.
- Parameters:
other – value to divide by.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> >>> tf.select(td.col("val"), td.col("val").truediv(3).alias("truediv")) >>> ┌────────┬────────────┐ │ val ┆ truediv │ │ --- ┆ --- │ │ f64 ┆ f64 │ ╞════════╪════════════╡ │ 0.0123 ┆ 0.0041 │ │ 2.0244 ┆ 0.6748 │ │ 0.0 ┆ 0.0 │ │ inf ┆ inf │ │ -50.0 ┆ -16.666667 │ │ 1.0 ┆ 0.333333 │ │ NaN ┆ NaN │ │ null ┆ null │ │ -112.0 ┆ -37.333333 │ │ 2142.0 ┆ 714.0 │ └────────┴────────────┘