Drop nulls (missing values)
Description
Drop all rows that contain nulls (which correspond to NA
in
R).
Usage
<LazyFrame>$drop_nulls(subset = NULL)
Arguments
subset
|
A character vector with the names of the column(s) for which nulls are
considered. If NULL (default), use all columns.
|
Value
LazyFrame
Examples
library("polars")
tmp = mtcars
tmp[1:3, "mpg"] = NA
tmp[4, "hp"] = NA
tmp = pl$LazyFrame(tmp)
# number of rows in `tmp` before dropping nulls
tmp$collect()$height
#> [1] 32
#> [1] 28
#> [1] 29
#> [1] 28