Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Grouped Summary Table | Data Manipulation for Research
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Researchers

bookChallenge: Grouped Summary Table

Завдання

Swipe to start coding

Given a DataFrame with columns 'experiment', 'group', and 'score', create a function that returns a new DataFrame showing the mean and standard deviation of 'score' for each combination of 'experiment' and 'group'. The resulting DataFrame should have a multi-level index with 'experiment' and 'group'.

  • Group the input DataFrame by the 'experiment' and 'group' columns.
  • Calculate the mean and standard deviation of the 'score' column for each group.
  • Return a new DataFrame with the results, using a multi-level index of 'experiment' and 'group'.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 5
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

bookChallenge: Grouped Summary Table

Свайпніть щоб показати меню

Завдання

Swipe to start coding

Given a DataFrame with columns 'experiment', 'group', and 'score', create a function that returns a new DataFrame showing the mean and standard deviation of 'score' for each combination of 'experiment' and 'group'. The resulting DataFrame should have a multi-level index with 'experiment' and 'group'.

  • Group the input DataFrame by the 'experiment' and 'group' columns.
  • Calculate the mean and standard deviation of the 'score' column for each group.
  • Return a new DataFrame with the results, using a multi-level index of 'experiment' and 'group'.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 5
single

single

some-alt