Find out the sale amount for each id Day 1 to Day 4 i.e. Total sale amount in the first 4 days Day 5 to Day 10 i.e. Total sale amount in the next 5 days and so on Day 11 to Day 18 Day 19 to Day 28 Beyond Day 28 till date
What should I do next, how to select sum first 3 sale amounts together?
df.groupby(['ID','date']).sum()
output
ID DATE
8259951 01/01/22 2000.0
02/01/22 1000.0
08/01/22 7000.0
09/01/22 4150.0
14/01/22 6000.0
... ... ...
148173081 31/01/22 150.0
148174131 31/01/22 100.0
148174601 31/01/22 1950.0
148174631 31/01/22 300.0
148175761 31/01/22 100.0