Skip to content

Check whether the expression contains one or more null values

Source code

Description

Check whether the expression contains one or more null values

Usage

<Expr>$has_nulls()

Value

Expr

Examples

library("polars")

df = pl$DataFrame(
  a = c(NA, 1, NA),
  b = c(1, NA, 2),
  c = c(1, 2, 3)
)

df$select(pl$all()$has_nulls())
#> shape: (1, 3)
#> ┌──────┬──────┬───────┐
#> │ a    ┆ b    ┆ c     │
#> │ ---  ┆ ---  ┆ ---   │
#> │ bool ┆ bool ┆ bool  │
#> ╞══════╪══════╪═══════╡
#> │ true ┆ true ┆ false │
#> └──────┴──────┴───────┘