I'm trying to resample daily data to weekly data using pandas.
I'm using the following:
weekly_start_date =pd.Timestamp('01/05/2011')
weekly_end_date =pd.Timestamp('05/28/2013')
daily_data = daily_data[(daily_data["date"] >= weekly_start_date) & (daily_data["date"] <= weekly_end_date)]
daily_data = daily_data.set_index('date',drop=False)
weekly_data = daily_data.resample('7D',how=np.sum,closed='left',label='left')
The problem is weekly_data doesn't have the date column anymore.
What did I miss?
Thanks,