This is an excerpt from a graded piece of work, shown with the marker’s comments so you can see what strong work looks like at this level.
Excerpt: Method
The raw file contained 18,402 rows and 14 columns. Missing values were concentrated in two columns, income and age, which together accounted for 91 percent of all gaps.
Rows missing both fields (n = 311) were dropped. Remaining gaps in age were imputed with the median within each occupation group, and income was imputed with a group median after a log transform to reduce skew.
All steps were applied through a single pandas pipeline so the cleaning can be reproduced from the raw file with one command. Unit tests confirm that no negative ages or incomes remain.
Marker feedback
Well-documented code and a rigorous discussion of limitations. Add a short note on runtime.
Samples are provided for study and reference only. Please follow your institution’s academic integrity policy.