Skip to content

Commit

Permalink
ffill
Browse files Browse the repository at this point in the history
  • Loading branch information
wenfeiy-db committed Jan 12, 2024
1 parent 010427e commit 857af6d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def _fit_predict(self, df: pd.DataFrame, cutoffs: List[pd.Timestamp], seasonal_p
@staticmethod
def _fill_missing_time_steps(df: pd.DataFrame, frequency: str):
# Forward fill missing time steps
df_filled = df.set_index("ds").resample(rule=OFFSET_ALIAS_MAP[frequency]).pad().reset_index()
df_filled = df.set_index("ds").resample(rule=OFFSET_ALIAS_MAP[frequency]).ffill().reset_index()
start_ds, modified_start_ds = df["ds"].min(), df_filled["ds"].min()
if start_ds != modified_start_ds:
offset = modified_start_ds - start_ds
Expand Down

0 comments on commit 857af6d

Please sign in to comment.