Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Cleaning Survey Data | Data Manipulation for Research
Python for Researchers

bookChallenge: Cleaning Survey Data

Aufgabe

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.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 7
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Cleaning Survey Data

Swipe um das Menü anzuzeigen

Aufgabe

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 7
single

single

some-alt