Ciaren

Fill Missing Values

Fill Missing Values

Use the Fill Nulls node to replace missing values instead of dropping the rows. It works on both the polars and pandas engines.

You'll use: File Input → Fill Nulls → File Output.

File Input
survey.csv
input
Fill Nulls
age → median · region → "Unknown"
clean
File Output
survey_filled.csv
output

Steps

  1. File Input — select your dataset.
  2. Fill Nulls — choose a strategy per group of columns:
    • Numeric: strategy: "median" (or "mean") with columns: ["age"].
    • Categorical: strategy: "constant", value: "Unknown", columns: ["region"].
    • Ordered/time-series: strategy: "ffill" (carry the last value forward) or "bfill" (carry the next value backward). Add a second Fill Nulls node when different columns need different strategies.
  3. File Output — write the filled result.

Before / after

Before
ageregion
25North
nullSouth
40null
3 rows · 2 cols
Fill Nulls (age → median, region → 'Unknown')
After
agenewregionnew
25North
32.5South
40Unknown
3 rows · 2 cols

Tips

  • For modeling, prefer imputing inside the model — a train node's Advanced → Preprocessing applies the same fill at predict time. See Feature Engineering.
  • Want to drop instead of fill? Use Drop Nulls.

See also