Loading...
The Month-by-Month Snapshot
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- mid, senior
Problem
You are given a list of sales records, each containing an employee identifier, a month name, and a sales amount. Reshape the data so that each employee appears once, with their monthly totals stored under named keys derived from the month itself. An employee who sold in January and March should have keys reflecting those specific months.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.