Skip to content

Check whether the expression contains one or more null values

Description

Check whether the expression contains one or more null values

Usage

<Expr>$has_nulls()

Value

A polars expression

Examples

library("polars")

df <- pl$DataFrame(
  a = c(NA, 1, NA),
  b = c(10, NA, 300),
  c = c(350, 650, 850)
)
df$select(pl$all()$has_nulls())
#> shape: (1, 3)
#> ┌──────┬──────┬───────┐
#> │ a    ┆ b    ┆ c     │
#> │ ---  ┆ ---  ┆ ---   │
#> │ bool ┆ bool ┆ bool  │
#> ╞══════╪══════╪═══════╡
#> │ true ┆ true ┆ false │
#> └──────┴──────┴───────┘