Project: from raw exports to a monthly report
From: Grace Mensah, Finance Operations
"Our two shops export orders differently. The EU shop sends orders_eu.csv: semicolons, amounts like 1.234,50 in euros, dates as day.month.year, and it's saved by an old Windows tool. The US shop sends orders_us.json with dollars and month/day/year dates. One EU order was exported twice.
I need one monthly total in US dollars across both shops, written to report.csv. Use 1.08 dollars per euro. And please add a test for the EU amount parser: last quarter a bug there cost us a week."
Done looks like: report.csv with month,total_usd, and a passing test.
This project ties the course together into the kind of script an analyst keeps and reruns every month. Each step is small; the value is in getting every format detail right and making the risky part tested.
European exports swap the roles of the comma and the period: 1.234,50 is one thousand two hundred thirty-four and a half. Parse it by removing the thousands dots and then turning the decimal comma into a period, in that order.
Dates arrive as 02.03.2026 (day first) and 03/04/2026 (month first). Parse each with its own format into real dates, then group by date.strftime("%Y-%m").
The amount parser gets a test that passes on a correct version and fails on a broken one, so the bug Grace mentions can't come back quietly.
def parse_eu_amount(text):
return float(text.replace(".", "").replace(",", "."))
parse_eu_amount("1.234,50"), parse_eu_amount("89,90")
Out: (1234.5, 89.9). Remove the thousands dots first, then swap the decimal comma.