Every Pupil's Slice

Data with PythonMedium+20 XP+20

Every Pupil's Slice

In Group and Summarise, groupby split the bakery's deliveries into one pile per city, and .sum() shrank each pile to a single number. pandas has a close relative of those summaries called transform, which takes the same summary names as text. Here are the two side by side on the lesson's table:

1city
2Bath 6
3Leeds 36
4York 18
5Name: amount, dtype: int64
60 36
71 18
82 36
93 6
104 18
115 36
12Name: amount, dtype: int64

A school fundraiser records how many pounds each pupil raised, and which form they are in. The organiser wants to know what slice of their own form's total each pupil brought in:

What does the last line print?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.