Skip to content

Calculate the upper bound

Description

Returns a unit Series with the highest value possible for the dtype of this expression.

Usage

<Expr>$upper_bound()

Value

A polars expression

Examples

library("polars")

df <- pl$DataFrame(a = 1:3)
df$select(pl$col("a")$upper_bound())
#> shape: (1, 1)
#> ┌────────────┐
#> │ a          │
#> │ ---        │
#> │ i32        │
#> ╞════════════╡
#> │ 2147483647 │
#> └────────────┘