Context. A store manager has a table of orders, each tagged with a region. They want the total sales for each region.
Your task. Write sales_per_region(df) that returns a pandas Series indexed by region, where each value is the sum of the amount column for that region.
Example.
Input df:
| region | amount |
|---|---|
| North | 100 |
| South | 50 |
| North | 30 |
Returns a Series:
region
North 130
South 50
Notes.