无法修复处理时间序列数据时的错误,SARIMAX mod

2024-04-24 09:08:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我目前正在基于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')函数插入时间和日期,但是得到了相同的错误!你知道吗


Tags: ofthetohh错误时间exceptionstart