Challenge: Cleaning Survey Data
Swipe to start coding
You are provided with a DataFrame containing survey responses, where some values in the 'age' and 'score' columns are missing. Your task is to implement a function that fills missing values in the 'age' column with the median age, and missing values in the 'score' column with the mean score. The function should return the cleaned DataFrame.
- Fill missing values in the 'age' column with the median of the 'age' column.
- Fill missing values in the 'score' column with the mean of the 'score' column.
- Return the resulting DataFrame.
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Can you explain this in simpler terms?
What are the main benefits or drawbacks?
Can you give me a real-world example?
Geweldig!
Completion tarief verbeterd naar 5
Challenge: Cleaning Survey Data
Veeg om het menu te tonen
Swipe to start coding
You are provided with a DataFrame containing survey responses, where some values in the 'age' and 'score' columns are missing. Your task is to implement a function that fills missing values in the 'age' column with the median age, and missing values in the 'score' column with the mean score. The function should return the cleaned DataFrame.
- Fill missing values in the 'age' column with the median of the 'age' column.
- Fill missing values in the 'score' column with the mean of the 'score' column.
- Return the resulting DataFrame.
Oplossing
Bedankt voor je feedback!
single