Abschnitt 1. Kapitel 12
single
Challenge: Generate Weekly Summary Table
Swipe um das Menü anzuzeigen
Aufgabe
Wischen, um mit dem Codieren zu beginnen
Write a function that takes a list of sales records, each with a sales amount and a timestamp, and summarizes total sales by week.
- Convert the
timestampvalues to pandas datetime objects. - Create a new column that identifies the week for each record.
- Group the records by week and sum the
salesfor each group. - Return a DataFrame with the weekly totals.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 12
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen