polars.Expr.is_finite#

Expr.is_finite() Expr[source]#

Returns a boolean Series indicating which values are finite.

Returns:
out

Series of type Boolean

Examples

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