Drop nulls (missing values)
Description
Drop all rows that contain nulls (which correspond to NA
in
R).
Usage
<DataFrame>$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
DataFrame
Examples
library("polars")
tmp = mtcars
tmp[1:3, "mpg"] = NA
tmp[4, "hp"] = NA
tmp = as_polars_df(tmp)
# number of rows in `tmp` before dropping nulls
tmp$height
#> [1] 32
#> [1] 28
#> [1] 29
#> [1] 28