Session Ready
Exercise

Mode and constant imputation

Filling in missing values with mean, median, constant and mode is highly suitable when you have to deal with a relatively small amount of missing values. In the previous exercise, you imputed using the mean and median methods. In this exercise, you'll fill in the most frequent values in the column and also perform another imputation by filling in a constant value.

As before, the diabetes DataFrame and the function SimpleImputer()have been loaded for you.

Instructions 1/2
undefined XP
  • 1
    • Create a SimpleImputer() object while performing mode (or most frequent) imputation.
    • Impute the copied DataFrame.
    • 2
      • Create a SimpleImputer() object while filling missing values to 0.
      • Impute the copied DataFrame.