polars.Series.is_nan#

Series.is_nan() Series[source]#

Returns a boolean Series indicating which values are NaN.

Returns:
Series

Series of data type Boolean.

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
]