Problem 1: Group and Aggregate Data
Easypython
Problem Description
Write a Python program that groups a sales DataFrame by "region" and calculates the total sales amount for each region.
Input
A DataFrame with "region" and "amount" columns.
Output
Total sales amount per region.
Constraints
- At least 2 different regions.
Example Input
text{"region": ["North","South","North"], "amount": [100,150,200]}
Example Output
textNorth 300 South 150
Concepts Covered
groupby(), .sum().