polars.any#

polars.any(exprs: Series) bool[source]#
polars.any(exprs: IntoExpr | Iterable[IntoExpr], *more_exprs: IntoExpr) Expr

Evaluate a bitwise OR operation.

If a single string is passed, this is an alias for pl.col(name).any().

If a single Series is passed, this is an alias for Series.any(). This functionality is deprecated.

Otherwise, this function computes the bitwise OR horizontally across multiple columns. This functionality is deprecated, use pl.any_horizontal instead.

Parameters:
exprs

Column(s) to use in the aggregation. Accepts expression input. Strings are parsed as column names, other non-expression inputs are parsed as literals.

*more_exprs

Additional columns to use in the aggregation, specified as positional arguments.

See also

any_horizontal

Examples

>>> df = pl.DataFrame(
...     {
...         "a": [True, False, True],
...         "b": [False, False, False],
...     }
... )
>>> df.select(pl.any("a"))
shape: (1, 1)
┌──────┐
│ a    │
│ ---  │
│ bool │
╞══════╡
│ true │
└──────┘