I'm trying to replace Pandas with Polars in production code, for better memory performance.
What would be the Polars equivalent of Pandas .isna()
method? I couldn't find any good equivalent in the doc.
I'm trying to replace Pandas with Polars in production code, for better memory performance.
What would be the Polars equivalent of Pandas .isna()
method? I couldn't find any good equivalent in the doc.
Polars has .is_null(). Note that Pandas has .isnull() as well, which is an alias for .isna()
.
I.e., per the example linked above:
s = pl.Series("a", [1.0, 2.0, 3.0, None])
s.is_null()
shape: (4,)
Series: 'is_null' [bool]
[
false
false
false
true
]