ComeçarComece de graça

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 exercício faz parte do curso

End-to-End Machine Learning

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Drop empty columns
heart_disease_column_dropped = heart_disease_df.____(____, ____)
Editar e executar o código