Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Grouped Summary Table | Data Manipulation for Research
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Researchers

bookChallenge: Grouped Summary Table

Uppgift

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'.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

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

Svep för att visa menyn

Uppgift

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'.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

some-alt