polars.any#
- polars.any(*names: str, ignore_nulls: bool = True) Expr | bool | None [source]#
Evaluate a bitwise OR operation.
Syntactic sugar for
col(names).any()
.- Parameters:
- *names
Name(s) of the columns to use in the aggregation.
- ignore_nulls
Ignore null values (default).
If set to
False
, Kleene logic is used to deal with nulls: if the column contains any null values and noTrue
values, the output is null.
See also
Examples
>>> df = pl.DataFrame( ... { ... "a": [True, False, True], ... "b": [False, False, False], ... } ... ) >>> df.select(pl.any("a")) shape: (1, 1) ┌──────┐ │ a │ │ --- │ │ bool │ ╞══════╡ │ true │ └──────┘