Skip to content

Compute square root

Description

Compute square root

Usage

<Expr>$sqrt()

Value

A polars expression

Examples

library("polars")

pl$DataFrame(a = c(1, 2, 4))$
  with_columns(sqrt = pl$col("a")$sqrt())
#> shape: (3, 2)
#> ┌─────┬──────────┐
#> │ a   ┆ sqrt     │
#> │ --- ┆ ---      │
#> │ f64 ┆ f64      │
#> ╞═════╪══════════╡
#> │ 1.0 ┆ 1.0      │
#> │ 2.0 ┆ 1.414214 │
#> │ 4.0 ┆ 2.0      │
#> └─────┴──────────┘