Rounds down to the nearest integer value
Description
This only works on floating point Series.
Usage
<Expr>$floor()
Value
A polars expression
Examples
library("polars")
df <- pl$DataFrame(a = c(0.3, 0.5, 1.0, 1.1))
df$with_columns(
floor = pl$col("a")$floor()
)
#> shape: (4, 2)
#> ┌─────┬───────┐
#> │ a ┆ floor │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═════╪═══════╡
#> │ 0.3 ┆ 0.0 │
#> │ 0.5 ┆ 0.0 │
#> │ 1.0 ┆ 1.0 │
#> │ 1.1 ┆ 1.0 │
#> └─────┴───────┘