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

bookChallenge: Grouped Summary Table

Aufgabe

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ösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 5
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: Grouped Summary Table

Swipe um das Menü anzuzeigen

Aufgabe

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ö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 5
single

single

some-alt