Skip to content

Compute the exponential of the elements

Source code

Description

Compute the exponential of the elements

Usage

<Expr>$exp()

Value

Expr

Examples

library(polars)

pl$DataFrame(a = -1:3)$with_columns(a_exp = pl$col("a")$exp())
#> shape: (5, 2)
#> ┌─────┬───────────┐
#> │ a   ┆ a_exp     │
#> │ --- ┆ ---       │
#> │ i32 ┆ f64       │
#> ╞═════╪═══════════╡
#> │ -1  ┆ 0.367879  │
#> │ 0   ┆ 1.0       │
#> │ 1   ┆ 2.718282  │
#> │ 2   ┆ 7.389056  │
#> │ 3   ┆ 20.085537 │
#> └─────┴───────────┘