Session 8 Exercise — Generating the Excel Report
Optional enrichment — complete during the session if time allows, or finish independently on your fork.
Your Task
- Load
exercises/data/merged_contacts.csv(produced in the Session 5 exercise) - Load
exercises/data/size_summary.csv(produced in the Session 6 exercise) - Write both DataFrames to a single Excel file
exercises/data/contacts_report.xlsx- Sheet 1:
"Contacts"— the merged contacts data - Sheet 2:
"By School Size"— the size summary
- Sheet 1:
- Use
index=Falseon both sheets
Starter Script
Open session_08_exercise.py and fill in the blanks marked with # TODO:. Note: this exercise predefines ___ = None at the top — a missed blank will raise a clear error rather than a silent one. If you get stuck, the completed version is at session_08_answer.py.
Run from the repo root:
python exercises/session_08_exercise.py