Skip to content

Compute cube root

Description

Compute cube root

Usage

<Expr>$cbrt()

Value

A polars expression

Examples

library("polars")

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