Skip to content

Return the number of null elements for each column

Description

Return the number of null elements for each column

Usage

<LazyFrame>$null_count()

Value

A polars LazyFrame

Examples

library("polars")

lf <- pl$LazyFrame(a = 1:4, b = c(1, 2, 1, NA), c = rep(NA, 4))
lf$null_count()$collect()
#> shape: (1, 3)
#> ┌─────┬─────┬─────┐
#> │ a   ┆ b   ┆ c   │
#> │ --- ┆ --- ┆ --- │
#> │ u32 ┆ u32 ┆ u32 │
#> ╞═════╪═════╪═════╡
#> │ 0   ┆ 1   ┆ 4   │
#> └─────┴─────┴─────┘