SARIMAX模型

时间:2019-07-02 03:52:55

标签: python dataframe time-series series arima

我目前正在基于ARIMA [SARIMAX]建立时间序列模型,但遇到无法解决的错误,

这是我拥有的数据格式

DT[INDEX Column]      Value

YYYY-MM-DD HH:MM:SS   19273792.02
YYYY-MM-DD HH:MM:SS   283672.24
YYYY-MM-DD HH:MM:SS   324587654
YYYY-MM-DD HH:MM:SS   356543564

这是代码

pred = results.get_prediction(start = pd.to_datetime('yyyy-mm-dd'), dynamic = False) ##Error occurs in this line
pred_ci = pred.conf_int()
pred_ci.head()

这些是我遇到的主要错误

TypeError: 'int' object is not subscriptable

During handling of the above exception, another exception occurred:


KeyError: 'only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices'

During handling of the above exception, another exception occurred:


KeyError: 'The `start` argument could not be matched to a location related to the index of the data.'

我尝试为pd.to_datetime('yyyy-mm-dd hh:mm:ss')函数插入时间和日期,但出现相同的错误!

0 个答案:

没有答案