Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Load and explore data. Conduct simple data analysis.
Check data quality – NAs and imputation
10. Imputing NAs
Define customer activity levels
Congratulations

Instruction

Looks like we've got some NAs to deal with! Let's impute them.

Exercise

Replace the NAs under the categories_3m column with the average value of that same column. The average must be rounded – we want to impute NAs with whole numbers, not floating-point numbers.

Stuck? Here's a hint!

Use mean(), but don’t forget to set the optional na.rm argument to TRUE. Round the result.