Column.fillNull

Series fillNull(T)(T value)

Replaces null slots with a scalar of a compatible type, under the strict cast rules (the value must be representable in the column's dtype).

Parameters

valuethe fill value

Returns

the filled Series.

Throws

DataFrameException when the value does not fit the dtype.
Series fillNull(FillStrategy strategy)

Fills nulls by strategy. FORWARD copies the previous valid row (leading nulls stay null), BACKWARD copies the next valid row (trailing nulls stay null); both run across chunk boundaries. MEAN and MEDIAN fill null slots with the column's statistic over its valid values, computed once by the aggregate kernels (median = the 0.5 quantile) so the fill matches the grouped statistics bitwise. NaN counts as data (a NaN observation makes the mean NaN); integer columns promote to FLOAT64 for the fractional statistic, FLOAT32 and FLOAT64 keep their kind; a column with no valid values stays all-null under the promoted dtype; a column without nulls is returned unchanged in its own dtype.

Parameters

strategythe fill strategy

Returns

the filled Series.

Throws

DataFrameException for the rich kinds under every

strategy, and for non-numeric kinds under MEAN/MEDIAN.