Skip to content

Rounds up to the nearest integer value

Description

This only works on floating point Series.

Usage

<Expr>$ceil()

Value

A polars expression

Examples

library("polars")

df <- pl$DataFrame(a = c(0.3, 0.5, 1.0, 1.1))
df$with_columns(
  ceil = pl$col("a")$ceil()
)
#> shape: (4, 2)
#> ┌─────┬──────┐
#> │ a   ┆ ceil │
#> │ --- ┆ ---  │
#> │ f64 ┆ f64  │
#> ╞═════╪══════╡
#> │ 0.3 ┆ 1.0  │
#> │ 0.5 ┆ 1.0  │
#> │ 1.0 ┆ 1.0  │
#> │ 1.1 ┆ 2.0  │
#> └─────┴──────┘