Skip to content

Commit

Permalink
remove copy from _prepare_dataframe_to_predict
Browse files Browse the repository at this point in the history
  • Loading branch information
ourownstory committed Sep 13, 2024
1 parent 71f8bab commit 9d1e8e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions neuralprophet/data/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ def _prepare_dataframe_to_predict(model, df: pd.DataFrame, max_lags: int, freq:
# Receives df with ID column
df_prepared = pd.DataFrame()
for df_name, df_i in df.groupby("ID"):
df_i = df_i.copy(deep=True)
_ = df_utils.infer_frequency(df_i, n_lags=max_lags, freq=freq)
# check if received pre-processed df
if "y_scaled" in df_i.columns or "t" in df_i.columns:
Expand Down Expand Up @@ -283,7 +282,7 @@ def _prepare_dataframe_to_predict(model, df: pd.DataFrame, max_lags: int, freq:
config_seasonality=model.config_seasonality,
predicting=True,
)
df_prepared = pd.concat((df_prepared, df_i.copy(deep=True).reset_index(drop=True)), ignore_index=True)
df_prepared = pd.concat((df_prepared, df_i.reset_index(drop=True)), ignore_index=True)
return df_prepared


Expand Down

0 comments on commit 9d1e8e8

Please sign in to comment.