So I ran a time series model on a small sales data set, and forecasted sales for next 12 periods. With the following code:
mod1=ARIMA(df1, order=(2,1,1)).fit(disp=0,transparams=True)
y_future=mod1.forecast(steps=12)[0]
where df1 contains the sales values with months being the index. Now I'm storing the predicted values in the following manner:
pred.append(y_future)
Now, I need to append the forecasted values to the original dataset df1, preferably with the same index. I'm trying to use the following code:
df1.append(pred, ignore_index=False)
But I'm getting the following error:
TypeError: cannot concatenate a non-NDFrame object
I've tried converting pred variable to list and then appending, but to no avail. Any help will be appreciated. Thanks.