Cleaning your dataset
Real-world datasets like the heart disease dataset are often messy, containing duplicated or missing values. In this exercise, you will apply the skills learned in this chapter to perform data cleaning on the heart disease dataset. The dataset has already been loaded for you. Your task is to identify and carry out general cleaning operations based on the EDA results: remove empty columns, drop duplicate rows, and perform imputation on the restecg
column, which pertains to an electrocardiogram measure. Pandas
has been imported for you as pd
, and the heart disease dataset is stored as a pandas DataFrame called heart_disease_df
.
Este ejercicio forma parte del curso
End-to-End Machine Learning
Ejercicio interactivo práctico
Pruebe este ejercicio completando este código de muestra.
# Drop empty columns
heart_disease_column_dropped = heart_disease_df.____(____, ____)