Sección 1. Capítulo 12
single
Challenge: Generate Weekly Summary Table
Desliza para mostrar el menú
Tarea
Desliza para comenzar a programar
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.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 1. Capítulo 12
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla