MLA-C01 Data Preparation for Machine Learning Practice Question
A data scientist is working with a dataset that contains missing values in several numeric features. The data scientist wants to impute the missing values with the median of each feature. Which Amazon SageMaker Data Wrangler transformation should be used?
⚠ Common exam trap
It's easy for candidates to confuse the 'Replace missing with constant' option (which uses a fixed value) with the median strategy, or they may overcomplicate the solution by choosing a custom Python transform when a built-in option exists.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Handle missing values (with median strategy)
Amazon SageMaker Data Wrangler includes a built-in 'Handle missing values' transformation that supports imputation with the median strategy. This directly matches the requirement to replace missing numeric values with the median of each feature without writing custom code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Replace missing with constant
Why it's wrong here
Replacing missing entries with a constant inserts one fixed value into every affected column, so each feature's central tendency is not preserved. It is tempting because constant replacement is the standard choice when a sentinel such as zero or "Unknown" carries genuine business meaning.
- ✗
Custom transform with Python
Why it's wrong here
A custom Python transform would work, but it requires hand-written code to compute per-column medians and assign them, whereas Data Wrangler ships a built-in median imputation transform. Custom transforms suit bespoke logic such as domain-specific conditional fills that no prebuilt handler covers.
- ✗
Drop missing rows
Why it's wrong here
Dropping rows removes the incomplete records entirely, so no median value is ever calculated or substituted, leaving the feature distributions truncated. It is tempting because row deletion is the standard remedy when missingness is rare and random, or when training data must contain only complete cases.
- ✓
Handle missing values (with median strategy)
Why this is correct
The Handle missing values transformation with the median strategy computes each numeric feature's median and substitutes it for nulls, satisfying the requirement to impute with the median rather than mean or mode. It operates directly on the dataset within Data Wrangler's flow.
Go deeper
Related to this question
About these practice questions
One of 665 original MLA-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLA-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLA-C01 exam.