Expr.sqrt
methodView source ↗
def sqrt() -> Expr
Categories: numeric
Calculate the square root of the element value.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("val"), td.col("val").sqrt().alias("sqrt"))
>>>
┌──────┬──────────┐
│ val ┆ sqrt │
│ --- ┆ --- │
│ f64 ┆ f64 │
╞══════╪══════════╡
│ 1.0 ┆ 1.0 │
│ 2.0 ┆ 1.414214 │
│ NaN ┆ NaN │
│ 4.0 ┆ 2.0 │
│ 5.0 ┆ 2.236068 │
│ null ┆ null │
└──────┴──────────┘