Answers for "cumulative some by date for each user"

0

cumulative some by date for each user

df=df.sort_values(['date']).reset_index(drop=True)
df["cum_sale"]=df.groupby(['item'])['sale'].cumsum(axis=0)
Posted by: Guest on May-04-2021

Browse Popular Code Answers by Language