'Forecasting multiple series on python using autoarima or SARIMAX

I am trying to forecast multiple time series that exist in a single dataframe. However I am struggling with the loop. In my head, I want to go through each column (each product), forecast using autoarima, save the results in a new dataframe and move onto the next.

The dataframe looks as follows

Date| Product 1 | Product 2 | Product 3....

I have about 1000 product lines.

What I have got now is something along the following lines:

    series=pd.read_excel('C:Users\Isra\Desktop\Forecast.xlsx')
    series['Date']=series['Date'].astype('datetime64[ns]')
    series=series.set_index('Date')
    Products=series.columns.tolist()

    for x in enumerate(series):
    prod1=series.take([x],axis=1)
    #and then forecasting


Solution 1:[1]

With the AutoArima of github.com/statsforecast you can train multiple series. You just need your data to be in the following formar |Product Nr|Date|Vale

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user2443442