
A float column can hold two different kinds of missing: null for a value that is absent, and NaN for arithmetic that had no valid answer (think 0.0/0.0). Polars keeps them strictly separate.
fill_null() leaves NaN untouched, and fill_nan() leaves null untouched.
is_nan() on a null returns null instead of false, because nullness propagates through operations. And drop_nulls() keeps NaN rows in place.
Want one uniform treatment? Convert first, then fill: fill_nan(None) turns every NaN into a proper null, and fill_null(0.0) handles the rest in one go.
In the example below, sensor B keeps its NaN after fill_null(), and sensor C reports null for is_nan(). The "both" column shows the two-step fix.

English










