Skip to main content
Version: 0.9.0

Expr.sqrt

def sqrt() -> TdExpr

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.01.0
2.01.414214
│ NaN ┆ NaN │
4.02.0
5.02.236068
│ null ┆ null │
└──────┴──────────┘