Challenge: 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'.
Løsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 5
Challenge: Grouped Summary Table
Stryg for at vise menuen
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
Tak for dine kommentarer!
single