Skip to content

Drop missing values

Source code

Description

Drop missing values

Usage

<Expr>$drop_nulls()

Value

Expr

See Also

drop_nans()

Examples

library("polars")

pl$DataFrame(list(x = c(1, 2, NaN, NA)))$select(pl$col("x")$drop_nulls())
#> shape: (3, 1)
#> ┌─────┐
#> │ x   │
#> │ --- │
#> │ f64 │
#> ╞═════╡
#> │ 1.0 │
#> │ 2.0 │
#> │ NaN │
#> └─────┘