Challenge: Data Cleaning
Aufgabe
Swipe to start coding
You are given the Titanic dataset loaded through the Seaborn library. Your task is to clean the dataset using pandas by performing the following steps:
- Load the dataset with
sns.load_dataset("titanic"). - Replace missing values in the column
agewith the column mean. - Replace missing values in the column
embarkedwith the most frequent value (mode). - Remove duplicate rows.
- Remove outliers in the column
fareusing the IQR method.
Return the final cleaned dataset as a DataFrame named cleaned_data.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 4
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 8.33
Challenge: Data Cleaning
Swipe um das Menü anzuzeigen
Aufgabe
Swipe to start coding
You are given the Titanic dataset loaded through the Seaborn library. Your task is to clean the dataset using pandas by performing the following steps:
- Load the dataset with
sns.load_dataset("titanic"). - Replace missing values in the column
agewith the column mean. - Replace missing values in the column
embarkedwith the most frequent value (mode). - Remove duplicate rows.
- Remove outliers in the column
fareusing the IQR method.
Return the final cleaned dataset as a DataFrame named cleaned_data.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 4
single