polars.Expr.is_infinite#

Expr.is_infinite() Expr[source]#

Returns a boolean Series indicating which values are infinite.

Returns:
out

Series of type Boolean

Examples

>>> df = pl.DataFrame(
...     {
...         "A": [1.0, 2],
...         "B": [3.0, float("inf")],
...     }
... )
>>> df.select(pl.all().is_infinite())
shape: (2, 2)
┌───────┬───────┐
│ A     ┆ B     │
│ ---   ┆ ---   │
│ bool  ┆ bool  │
╞═══════╪═══════╡
│ false ┆ false │
├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ false ┆ true  │
└───────┴───────┘