Osio 1. Luku 12
single
Challenge: Generate Weekly Summary Table
Pyyhkäise näyttääksesi valikon
Tehtävä
Pyyhkäise aloittaaksesi koodauksen
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.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 12
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme