DataFrame 1.0 Help

fill

Replace missing values.

Related operations: Update / convert values

The examples on this page use the following dataframe:

df

fillNulls

Replaces null values with given value or expression.

See also dropNulls, which removes rows with null values instead of replacing these values.

See column selectors for how to select the columns for this operation.

df.fillNulls { weight }.with { -1.0 }

same as

df.update { weight }.where { it == null }.with { -1.0 }

fillNaNs

Replaces NaN values (Double.NaN and Float.NaN) with given value or expression.

See also dropNaNs, which removes rows with NaN values instead of replacing these values.

See column selectors for how to select the columns for this operation.

df.fillNaNs { weight }.withZero()

fillNA

Replaces NA values (null, Double.NaN, and Float.NaN) with given value or expression.

See also dropNA, which removes rows with NA values instead of replacing these values.

See column selectors for how to select the columns for this operation.

df.fillNA { weight }.with { -1.0 }
17 September 2026