Repository: ourownstory/neural_prophet

Issue:
events_df is filled with NaNs at the end when predicting into known future
Suppose we would like to add Events to the model df. 
If we are predicting into the known future, not using `make_future_dataframe()`, the df column y **and** the events column(s) are filled with NaN, according to `n_forecasts`. However, in the case of predictions into the unknown future, `make_future_dataframe()` prepares the df so that events columns are filled with zeros instead of NaNs. 

Code Sample: 
```
# import packages
import numpy as np
import datetime
import plotly
import seaborn as sns
import pandas as pd
from neuralprophet import NeuralProphet
from neuralprophet import set_random_seed
set_random_seed(0)
import warnings
warnings.filterwarnings("ignore")
​
# create dummy data set for illustration
df = pd.DataFrame({'ds': pd.date_range('2018-01-01', '2022-11-15')})
df['y'] = np.random.randint(1, 1000, df.shape[0])
​
# create training and validating set. Validating on the last 3 months (92 days)
df_train = df.iloc[:-92]
df_test = df.iloc[-92:]
​
params={
    'n_changepoints': 15,
    'changepoints_range': 0.95,
    'yearly_seasonality': True,
    'weekly_seasonality': True,
    'n_lags': 20,
    'n_forecasts': 10,
    'learning_rate': 0.01,
    'batch_size' : 8,
}
​
m = NeuralProphet(**params)
​
# Set up an event DataFrame
def events():
    promo = pd.DataFrame({
        'event': 'Free_Ship',
        'ds': pd.date_range(start='2021-11-25', end='2021-12-22'),
    })    
    lcd = pd.DataFrame({
        'event': 'LCD',
        'ds': pd.date_range(start='2021-12-20', end='2021-12-30'),
    })
    covid_wave1 = pd.DataFrame({
        'event': 'covid_wave1',
        'ds': pd.date_range('2020-04-01',periods=29,freq='D'),
    })
    covid_wave2 = pd.DataFrame({
        'event': 'covid_wave2',
        'ds': pd.date_range('2020-07-24',periods=40,freq='D'),
    })
    covid_wave3 = pd.DataFrame({
        'event': 'covid_wave3',
        'ds': pd.date_range('2021-01-28',periods=34,freq='D'),
    })
    covid_wave4 = pd.DataFrame({
        'event': 'covid_wave4',
        'ds': pd.date_range('2021-07-24',periods=59,freq='D'),
    })
    events_df = pd.concat(
        (
            promo,
            lcd,
            covid_wave1,
            covid_wave2,
            covid_wave3,
            covid_wave4,
        )
    )
    events_df["ds"] = events_df["ds"].apply(lambda x: x.date())
    events_df['ds'] = pd.to_datetime(events_df.ds)
    events_df["ds"] = events_df['ds'].dt.strftime('%Y-%m-%d')
​
    return events_df
​
events_df = events()
​
# Add in events and customise events window
m = m.add_events(
    [
        'Free_Ship',
        'LCD',
        'covid_wave1',
        'covid_wave2',
        'covid_wave3',
        'covid_wave4'
    ],
)
​
df_train = m.create_df_with_events(df_train, events_df)
df_test = m.create_df_with_events(df_test, events_df)
​
metrics = m.fit(df=df_train, freq='D', validation_df=df_test, progress="bar")
​
predict = m.predict(df_test)
```


Discussion:

Resolving patch:
diff --git a/neuralprophet/forecaster.py b/neuralprophet/forecaster.py
--- a/neuralprophet/forecaster.py
+++ b/neuralprophet/forecaster.py
@@ -2763,6 +2763,7 @@ def _maybe_extend_df(self, df):
                     last_date=last_date,
                     periods=periods_add[df_name],
                     freq=self.data_freq,
+                    config_events=self.config_events,
                 )
                 future_df["ID"] = df_name
                 df_i = pd.concat([df_i, future_df])


Test patch: