Handling Missing Data

Cover key questions around imputation and additional techniques to handle missing data.

Missing data is unavoidable in real-world datasets, and how you deal with it can significantly impact the quality of your analysis or model. In this lesson, we’ll practice two foundational techniques: imputing missing values using the mean and dropping incomplete rows entirely. Let’s get started.

Imputing missing values with the mean

You are provided with a dataset containing customer information. Some of the values are missing, represented as None. Your task is to implement a function that imputes the missing values in the dataset using the mean of the available values for each feature.

Implement a function impute_missing_values(data) (line 19) that fills the missing values in the dataset ...