官网链接
https://pandas.pydata.org/docs/user_guide/timeseries.html#timeseries-holiday
- 将时间变成 datetime 格式
df['datetime'] = pd.to_datetime(df['time'])
- 将datetime 列设置为索引,后续才能进行resampl
https://pandas.pydata.org/docs/user_guide/timeseries.html#timeseries-holiday
df['datetime'] = pd.to_datetime(df['time'])