Skip to content

Find the upper bound of a DataType

Source code

Description

Find the upper bound of a DataType

Usage

<Expr>$upper_bound()

Value

Expr

Examples

library("polars")

pl$DataFrame(
  x = c(1, 2, 3), y = -2:0,
  schema = list(x = pl$Float64, y = pl$Int32)
)$
  select(pl$all()$upper_bound())
#> shape: (1, 2)
#> ┌─────┬────────────┐
#> │ x   ┆ y          │
#> │ --- ┆ ---        │
#> │ f64 ┆ i32        │
#> ╞═════╪════════════╡
#> │ inf ┆ 2147483647 │
#> └─────┴────────────┘