We are creating a wrapper in Skforecast for forecasting using ARIMA models and we are using pmdarima as a dependency.
We are trying to apply the append method from statsmodels in ARIMA().arima_res_and we are finding different behavior between pmdarima and statsmodels.
Inside ARIMA.arima_res_ there is an attribute that stores the original endogenous data (ARIMA().arima_res_.model.data.orig_endog). When statsmodels is used, it stores the pd.Series and its name but when pmdarima is used the name is removed.
As result, when we try to apply the append() method we get the following error:
ValueError: Columns must match to concatenate along rows.
Describe the question you have
Hello!
We are creating a wrapper in Skforecast for forecasting using ARIMA models and we are using pmdarima as a dependency.
We are trying to apply the append method from statsmodels in
ARIMA().arima_res_
and we are finding different behavior between pmdarima and statsmodels.Inside
ARIMA.arima_res_
there is an attribute that stores the original endogenous data (ARIMA().arima_res_.model.data.orig_endog
). When statsmodels is used, it stores thepd.Series
and its name but when pmdarima is used the name is removed.As result, when we try to apply the
append()
method we get the following error:Reproducible example:
np.random.seed(123) y_datetime = pd.Series(data=np.random.rand(50)) y_datetime.name = 'y' y_datetime.index = pd.date_range(start='2000', periods=50, freq='A') print(y_datetime.head(5))
last_window_datetime = pd.Series(data=np.random.rand(50)) last_window_datetime.name = 'y' last_window_datetime.index = pd.date_range(start='2050', periods=50, freq='A')
2000-12-31 0.696469 2001-12-31 0.286139 2002-12-31 0.226851 2003-12-31 0.551315 2004-12-31 0.719469 Freq: A-DEC, Name: y, dtype: float64
append()
does not work)2000-12-31 0.696469 2001-12-31 0.286139 2002-12-31 0.226851 2003-12-31 0.551315 2004-12-31 0.719469 Freq: A-DEC, dtype: float64
Versions (if necessary)