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

bookChallenge: Cleaning Survey Data

Tarefa

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.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 7
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Cleaning Survey Data

Deslize para mostrar o menu

Tarefa

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.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 7
single

single

some-alt