Context. A flat table of sales rows — each tagged with a region and a quarter — needs to become a region-by-quarter summary grid.
Your task. Write sales_pivot(df) that returns a pivot table with one row per region, one column per quarter, and the sum of amount in each cell. Turn the region index back into a regular column.
Example. rows for East/Q1 and East/Q2 collapse to a single East row with a Q1 and a Q2 column.
Notes. Several rows can share the same region+quarter — sum them. Every region/quarter combination in the data has at least one row.