Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Data Cleaning | Section
Practice
Projects
Quizzes & Challenges
Quiz
Challenges
/
Data Preprocessing and Feature Engineering

bookChallenge: Data Cleaning

Compito

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:

  1. Load the dataset with sns.load_dataset("titanic").
  2. Replace missing values in the column age with the column mean.
  3. Replace missing values in the column embarked with the most frequent value (mode).
  4. Remove duplicate rows.
  5. Remove outliers in the column fare using the IQR method.

Return the final cleaned dataset as a DataFrame named cleaned_data.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 4
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

close

bookChallenge: Data Cleaning

Scorri per mostrare il menu

Compito

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:

  1. Load the dataset with sns.load_dataset("titanic").
  2. Replace missing values in the column age with the column mean.
  3. Replace missing values in the column embarked with the most frequent value (mode).
  4. Remove duplicate rows.
  5. Remove outliers in the column fare using the IQR method.

Return the final cleaned dataset as a DataFrame named cleaned_data.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 4
single

single

some-alt