I currently have a data frame dfB which looks like follows
My goal is to now plot the number of orders per week. I am not sure of how to go about grouping my column most_recent_order_date per week,though. How can I do this?
I currently have a data frame dfB which looks like follows
My goal is to now plot the number of orders per week. I am not sure of how to go about grouping my column most_recent_order_date per week,though. How can I do this?
Convert the date column to datetime
dtype if you haven't already.
dfB['most_recent_order_date'] = pd.to_datetime(dfB.most_recent_order_date)
Then use resample
dfB.resample('W-Mon', on='most_recent_order_date').sum()