Pandas `.isna()` 方法的 Polars 等价物是什么?

What is the Polars equivalent of Pandas `.isna()` method?

我正在尝试将生产代码中的 Pandas 替换为 Polars,以获得更好的内存性能。

Pandas .isna() 方法的 Polars 等价物是什么?我在文档中找不到任何好的等效项。

Polars 也有 .is_null(). Note that Pandas has .isnull(),这是 .isna() 的别名。

即,根据上面链接的示例:

s = pl.Series("a", [1.0, 2.0, 3.0, None])

s.is_null()
shape: (4,)
Series: 'is_null' [bool]
[
        false
        false
        false
        true
]