New Expr referring to all columns
Description
Not to mix up with Expr_object$all()
which is a ‘reduce
Boolean columns by AND’ method.
Usage
pl$all(name = NULL)
Arguments
name
|
Character vector indicating on which columns the AND operation should be applied. |
Value
Boolean literal
Examples
#> shape: (2, 2)
#> ┌───────┬───────┐
#> │ col_1 ┆ col_2 │
#> │ --- ┆ --- │
#> │ bool ┆ bool │
#> ╞═══════╪═══════╡
#> │ true ┆ true │
#> │ true ┆ false │
#> └───────┴───────┘
# here, the first `$all()` selects all columns, and the second `$all()` checks
# whether all values are true in each column
test$with_columns(pl$all()$all())
#> shape: (2, 2)
#> ┌───────┬───────┐
#> │ col_1 ┆ col_2 │
#> │ --- ┆ --- │
#> │ bool ┆ bool │
#> ╞═══════╪═══════╡
#> │ true ┆ false │
#> │ true ┆ false │
#> └───────┴───────┘