Skip to content

Commit

Permalink
More precise start_date determination
Browse files Browse the repository at this point in the history
  • Loading branch information
kvantricht committed Aug 21, 2024
1 parent 7c0e160 commit 3f5cae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion presto/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def process_parquet(df: pd.DataFrame) -> pd.DataFrame:
)

# Now reassign start_date to the actual subset counted back from end_date
df["start_date"] = df["end_date"] - pd.Timedelta(days=364)
df["start_date"] = df["end_date"] - pd.DateOffset(years=1) + pd.DateOffset(days=1)

df_pivot = df[(df["valid_date_ind"] >= 0) & (df["valid_date_ind"] < 12)].pivot(
index=index_columns, columns="valid_date_ind", values=feature_columns
Expand Down

0 comments on commit 3f5cae0

Please sign in to comment.