Missing Value Imputer

Fill blank cells in a CSV with mean, median, most-frequent, a constant, or KNN imputation — choose the columns and what counts as missing. Runs entirely in your browser, nothing is uploaded.

Try:
Imputed CSV

Fill missing values in a CSV

Paste a CSV with blank or NA cells and this tool fills them in locally in your browser — nothing is uploaded. Pick the imputation strategy that fits your data:

A cell counts as missing when it is empty after trimming, or equals one of the extra markers you list under missing markers (for example NA, null, ?). Mean, median, and KNN only touch numeric columns (a column whose every present value parses as a number); most-frequent and constant apply to any column.

Worked example

With the default Mean strategy, this input:

name,age,city
Alice,30,NYC
Bob,,LA
Carol,40,

becomes:

name,age,city
Alice,30,NYC
Bob,35,LA
Carol,40,

age is numeric, so Bob's blank is filled with the mean of 30 and 4035. The blank city for Carol is left untouched because city is a text column and mean/median only impute numeric data; switch to Most frequent or Constant to fill it.

FAQ

Which columns get imputed?

By default every applicable column. Type a comma-separated list under Columns to impute to restrict it — use header names (like age,income) when the first row is a header, or 1-based indexes (like 2,3). Columns you don't list are copied through unchanged.

What counts as a missing value?

A cell is missing when it's empty or whitespace-only after trimming. To also treat sentinel strings as missing, list them under Extra missing markersNA,null,? for example. Matching is exact and case-sensitive, so NA is missing but na is not unless you add it too.

How does the mean/median differ from most-frequent and constant?

Mean and median are numeric: they only fill columns whose present values are all numbers, and they skip text columns entirely. Most frequent picks the most common existing value (ties go to the first one seen) and works on any column, including categories. Constant ignores the data and writes whatever you put in Fill value into every blank.

How does KNN imputation work here?

For each missing numeric cell, the tool measures the distance from that row to every other row that has a value in the column, using a nan-euclidean metric over the numeric columns (it scales by the number of shared present features). It then averages the n_neighbors closest rows — a plain average with Uniform weights, or an inverse-distance weighted average with Distance. Rows with no comparable neighbour fall back to the column mean.

Is my data uploaded anywhere?

No. The whole imputation runs locally with WebAssembly; your CSV never leaves your browser.

Limits & edge cases

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool missing-value-imputer "name,age,city
Alice,30,NYC
Bob,,LA
Carol,40,"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/missing-value-imputer/?input=name%2Cage%2Ccity%0AAlice%2C30%2CNYC%0ABob%2C%2CLA%0ACarol%2C40%2C&strategy=mean&header=true&delimiter=comma&columns=age%2Ccity&na_tokens=NA%2Cnull%2C%3F&fill_value=0&n_neighbors=5&weights=uniform

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.