How would you handle missing categorical data?

Quick Overview

A data cleaning interview question on how to deal with missing values in a categorical column before analysis or modeling. It tests whether you can judge why values are missing, compare the common fill strategies and their side effects, and avoid leakage in a modeling pipeline.

How would you handle missing categorical data?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

How would you handle missing categorical data? ```hint Ask why it is missing Before choosing a fill value, ask whether the absence of a value could itself tell you something about the row. ``` ### What a Strong Answer Covers - Why numeric strategies such as the mean do not apply, and the main options for a categorical field - How to judge whether missingness is random or informative, and how that drives the choice - The trade-offs of each option, including distorted proportions, cost, and leakage - Practical handling: disguised missing values, fitting on training data only, and the order relative to encoding ### Follow-up Questions - A field is 30% missing, and almost all of the gaps come from one signup channel. How does that change your approach? - How would you handle a category that appears at serving time but never appeared in training? - When would you use multiple imputation instead of a single fill value? - Some tree-based libraries handle missing values natively. Does that remove the need to impute?

Overview: A data cleaning interview question on how to deal with missing values in a categorical column before analysis or modeling. It tests whether you can judge why values are missing, compare the common fill strategies and their side effects, and avoid leakage in a modeling pipeline.

General logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

How would you handle missing categorical data?

What a Strong Answer Covers Guidance

  • Why numeric strategies such as the mean do not apply, and the main options for a categorical field
  • How to judge whether missingness is random or informative, and how that drives the choice
  • The trade-offs of each option, including distorted proportions, cost, and leakage
  • Practical handling: disguised missing values, fitting on training data only, and the order relative to encoding

Follow-up Questions Guidance

  • A field is 30% missing, and almost all of the gaps come from one signup channel. How does that change your approach?
  • How would you handle a category that appears at serving time but never appeared in training?
  • When would you use multiple imputation instead of a single fill value?
  • Some tree-based libraries handle missing values natively. Does that remove the need to impute?