Skip to content

Handling Missing Data

For people

Why data goes missing, how to find out, and the options — dropping, imputing, flagging — with their trade-offs.

Editorial team 2 min read

Almost every real dataset has missing values. How you handle them affects your results.

First, Find It

Missing values aren't always blank. Look for NA, null, ?, -999, empty strings, "unknown" and impossible values like a birth year of 1900. Tell your tools about these markers when loading data.

Understand Why It's Missing

  • Missing completely at random: unrelated to anything — a sensor glitch. Dropping rows causes little bias.
  • Missing at random: related to other observed variables — younger customers skip a field more often.
  • Missing not at random: related to the missing value itself — people with high incomes decline to state income. Most dangerous for bias.

Options

Approach When it fits
Drop rows Few rows affected, missingness random
Drop columns Mostly empty or unimportant
Impute median/mode Simple, modest gaps
Impute from other features Missingness depends on other variables
Add a "missing" indicator Missingness itself may carry information
Use models that handle missing values Gradient boosting libraries often do natively

Avoid Leakage

Compute imputation values from training data only, then apply them to validation and test data — pipelines make this automatic.

Report It

State how much data was missing and what you did. Results can change substantially depending on the approach, so test sensitivity when it matters.

More in Data for AI

All Data for AI guides →
Data for AI Guide · 1 min

How to Read a Dataset Card

The questions a dataset card should answer — what one row is, where the data came from, its licence and its quirks — before you use it.

Data for AI 1 min read 6 Apr 2026 For people

Data for AI Guide · 2 min

Data Quality Dimensions

Accuracy, completeness, consistency, timeliness, validity and uniqueness: a framework for checking whether data is fit for purpose.

Data for AI 2 min read 5 Apr 2026 For people

Data for AI Guide · 2 min

Detecting and Handling Outliers

How to spot unusual values, decide whether they are errors or genuine extremes, and treat them appropriately.

Data for AI 2 min read 3 Apr 2026 For people

Data for AI Guide · 2 min

Labelling Data for Machine Learning

How to create high-quality labels: clear guidelines, measuring agreement, handling ambiguity and reducing cost.

Data for AI 2 min read 2 Apr 2026 For people

Share X LinkedIn Reddit Bluesky Email

Discussion 0

Use @handle to bring somebody in, and #tag to file it.

Nothing here yet. Ask a question, or say how you used it.

Sign in to join the discussion. Sign in