-
-
Save yildizumut/ce6361df59bb22a030c2db3890d8cb4b to your computer and use it in GitHub Desktop.
Getting the length of prediction time horizon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n_of_wkdays = pd.date_range(start = pd.to_datetime(end_date, | |
format = "%Y-%m-%d") + pd.Timedelta('1 days'), | |
end = pd.to_datetime(pred_end_date, | |
format = "%Y-%m-%d")).to_series( | |
).map(lambda x: | |
1 if x.isoweekday() in range(1,6) else 0).sum() | |
T = n_of_wkdays | |
print(T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment