polars.Series.is_nan

Series.is_nan() polars.internals.series.Series

Get mask of NaN values if Series dtype is Float.

Returns
Boolean Series

Examples

>>> import numpy as np
>>> s = pl.Series("a", [1.0, 2.0, 3.0, np.NaN])
>>> s.is_nan()
shape: (4,)
Series: 'a' [bool]
[
        false
        false
        false
        true
]