Skip to content

Check if elements are NULL

Source code

Description

Returns a boolean Series indicating which values are null.

Usage

<Expr>$is_null()

Value

Expr

Examples

library("polars")

pl$DataFrame(list(x = c(1, NA, 3)))$select(pl$col("x")$is_null())
#> shape: (3, 1)
#> ┌───────┐
#> │ x     │
#> │ ---   │
#> │ bool  │
#> ╞═══════╡
#> │ false │
#> │ true  │
#> │ false │
#> └───────┘