1個回答
高志萍助教
2022-02-04 13:18
該回答已被題主采納
同學你好,
修改:
periods=pd.to_datetime(temp.index[1:])-pd.to_datetime(temp.index[:-1])
錯誤的原因是index里面是沒有to_datetime函數(shù)的
(應(yīng)該是pandas升級后,老版本的寫法不支持了)
