polars.all
-
Either return an expression representing all columns, or evaluate a bitwise AND operation.
If no arguments are passed, this function is syntactic sugar for
col("*"). Otherwise, this function is syntactic sugar forcol(names).all().- Parameters:
-
- *names
-
Name(s) of the columns to use in the aggregation.
- ignore_nulls
-
- If set to
True(default), null values are ignored. If there are no non-null values, the output isTrue. - If set to
False, Kleene logic is used to deal with nulls: if the column contains any null values and noFalsevalues, the output is null.
- If set to
See also
Examples
Selecting all columns.
>>> df = pl.DataFrame( ... { ... "a": [True, False, True], ... "b": [False, False, False], ... } ... ) >>> df.select(pl.all().sum()) shape: (1, 2) ┌─────┬─────┐ │ a ┆ b │ │ --- ┆ --- │ │ u32 ┆ u32 │ ╞═════╪═════╡ │ 2 ┆ 0 │ └─────┴─────┘Evaluate bitwise AND for a column.
>>> df.select(pl.all("a")) shape: (1, 1) ┌───────┐ │ a │ │ --- │ │ bool │ ╞═══════╡ │ false │ └───────┘
polars.all(
*names: str,
ignore_nulls: bool = True,
) → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.all.html