All articles

DATA & AI

Treat missing measurements as information

Inspect missingness before deciding how to remove, fill, or model incomplete records.

Missing values need an explicit representation

Pandas supports several ways to represent missing data and provides operations for detecting, filling, and removing it. The behavior depends on the data type and operation. Before applying those tools, decide what a missing entry means in the dataset: a measurement not taken, an unavailable result, an invalid record, or a value outside the collection process. [1]

Review the pattern first

Count missing entries by column and by groups that matter to the study. Inspect whether the same records are missing several measurements. Compare the collection process with the table so a blank field is not mistaken for a measured zero. Keep the original data unchanged and record any normalization of missing value markers.

Our suggested review table separates the missingness pattern from the proposed treatment. For each field, state whether it is essential to the analysis, how the data was collected, and what assumptions a treatment would require. Investigate whether removing incomplete rows changes the composition of the dataset. Avoid filling a column only because a convenient function is available.

Keep the treatment in the analysis pipeline

When a model requires imputation, include it in the documented preprocessing workflow and fit it using the appropriate training data. For reporting, make the number of available observations clear for each calculation. Check that the same treatment is used when new data arrives. The resulting decision should be inspectable by someone who understands the measurements, even if they do not know the software used to process them.

Sources

  1. Pandas: working with missing data