A monthly sales report
The problem
A shop exports raw sales, products and customers as CSV files. Build a pandas script that cleans them, merges them with checks and produces a monthly report by category, region and customer.
Requirements
- Reading with correct separators, types and dates, and a cleaning step with logged counts
- Merges with validate and indicator, reporting unmatched rows
- Monthly revenue with resample, category shares and the top customers with nlargest
- A pivot table of region by month and a short written summary
Technologies
- Python 3
- pandas
- groupby and pivot_table
- merge and resample
Step by step
- Inspect the three files and write down the questions and definitions.
- Load and clean each file, logging what changed.
- Merge with checks and compute the monthly and category tables.
- Add sanity checks and write the report tables and summary.
Expected result
A script that rebuilds the whole report from the raw files in one run.
How it is evaluated
- Every merge is validated and unmatched rows are reported
- Totals add up across tables
- Dates and types are parsed correctly
- The report answers the stated questions
Ways to improve it
- Add month-over-month growth
- Export the tables to Excel
- Flag unusual days automatically