I have a sales database of a product and I have it separated in train and test, as you can see below
this is the code i am using for arima:
y_train = df_train['quantity']
y_test = df_test['quantity']
fh = np.arange(len(y_test)) + 1
forecaster = ARIMA(order = (2,1,1))
forecaster.fit(y_train)
and when I do the predict , I get the following error
y_pred = forecaster.predict(fh)
KeyError: "None of [Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,\n ...\n 493, 494, 495, 496, 497, 498, 499, 500, 501, 502],\n dtype='int64', length=503)] are in the [index]"
any thoughts on what's going on?