Seção 1. Capítulo 12
single
Challenge: Generate Weekly Summary Table
Deslize para mostrar o menu
Tarefa
Deslize para começar 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.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 12
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo