Evaluate whether all boolean values in a sub-list are true
Description
Evaluate whether all boolean values in a sub-list are true
Usage
<Expr>$list$all()
Value
A polars expression
Examples
library("polars")
df <- pl$DataFrame(
a = list(c(TRUE, TRUE), c(FALSE, TRUE), c(FALSE, FALSE), NA, c())
)
df$with_columns(all = pl$col("a")$list$all())
#> shape: (5, 2)
#> ┌────────────────┬───────┐
#> │ a ┆ all │
#> │ --- ┆ --- │
#> │ list[bool] ┆ bool │
#> ╞════════════════╪═══════╡
#> │ [true, true] ┆ true │
#> │ [false, true] ┆ false │
#> │ [false, false] ┆ false │
#> │ [null] ┆ true │
#> │ null ┆ null │
#> └────────────────┴───────┘