Skip to content

Compute the base-10 logarithm

Description

Compute the base-10 logarithm

Usage

<Expr>$log10()

Value

A polars expression

Examples

library("polars")

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