Sales logs only have rows for days with sales. Before you can plot or model them, you need every day, then weekly totals.
df has a date column (strings like "2024-03-04") and an amount column, possibly with several rows per day.
Implement:
fill_daily(df): one row per calendar day from the first to the last date, with date (string) and amount (the day's total, 0.0 for days without sales), sorted by date, with a fresh 0…n−1 indexweekly_totals(df): a dict from each Monday ("YYYY-MM-DD") to that Monday-to-Sunday week's total. Include every week from the one containing the first date to the one containing the last date, even weeks with no sales.