Секція 1. Розділ 12
single
Challenge: Generate Weekly Summary Table
Свайпніть щоб показати меню
Завдання
Проведіть, щоб почати кодувати
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 12
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат