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

bookChallenge: Grouped Summary Table

Opgave

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 alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 5
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Grouped Summary Table

Stryg for at vise menuen

Opgave

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 desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 5
single

single

some-alt