0

考虑一个每小时观察的向量,数据每 12 小时更新一次。

用 R,我可以做到

ts(vector_with_R, 频率=12)

在 statsmodels 中,“频率”控制时间序列的单位,而不是“数据窗口”。如何更改“数据窗口”。

4

1 回答 1

1

为此,您需要pandas - 用于处理时间序列和其他分析数据的最流行的 python 包。Statsmodels 使用它:

import pandas as pd
t=pd.TimeSeries(range(10), index=pd.date_range(start='2010-10-10 06:00:00', periods=10, freq='H'))
于 2013-12-31T13:29:49.333 回答