When I run the forecast command withh a single lev...
# statsforecast
b
When I run the forecast command withh a single level I have no issues. However, when I run it with multiple levels, which for this particular task I need, I get the warning below. This happens whether I use the standard model prediction intervals or conformal PIs. Code;
forecasts_df = sf.forecast(h=3, level=[80,90,95,99], fitted = True)
Warning: `PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling frame.insert many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`` I've tested the same code limiting to just one level and repeated with the other leves as separate runs. I could then merge them. But, despite the warning, the code does seem to work correctly--I get the same output when I run the single levels on their own and compare. Is this a known issue? Is it, as I am thinking, a warning I can ignore?
j
You can ignore it, it's just pandas complaining about assigning several columns sequentially. Funny enough, their suggestion is both slower and consumes more memory
😂 1
b
OK. Thanks for confirming, @José Morales. Much appreciated.