Challenge: Data Cleaning
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 8.33
Challenge: Data Cleaning
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
single