Hey. You have to handle these null values in some way. For example, if you want to fill them with zeros you can use the before_predict_callback argument of predict and pass a function like:
Copy code
def fill_with_zeros(df):
return df.fillna(0)
✅ 1
José Morales
08/09/2023, 4:50 AM
Also you can avoid the nulls entirely by using less lags or removing the shorter series (you currently have at least one serie with less than 6 values)
i
Isaac
08/09/2023, 3:48 PM
Gotcha. That makes sense. Shouldn't there be an option to dropna or fillna built into predict like it is in fit?
j
José Morales
08/09/2023, 3:51 PM
If you drop the nulls in the predict you'd end up with series without predictions. If that's what you want it's probably better to drop them from the start. We're going to add an option soon to only predict a subset, that'll allow you to only predict the ones with the minimum required length and train including the shorter ones
i
Isaac
08/09/2023, 3:54 PM
Ah. I guess it makes sense to just fill NA instead of dropping.