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.
- 1InputFile Inputsurvey.csv
- 2CleanFill Nullsage →
median · region → "Unknown" - 3OutputFile Outputsurvey_filled.csv
Steps
- File Input — select your dataset.
- Fill Nulls — choose a strategy per group of columns:
- Numeric:
strategy: "median"(or"mean") withcolumns: ["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.
- Numeric:
- File Output — write the filled result.
Before / after
Before
| age | region |
|---|---|
| 25 | North |
| null | South |
| 40 | null |
3 rows · 2 cols
After
| agenew | regionnew |
|---|---|
| 25 | North |
| 32.5 | South |
| 40 | Unknown |
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.