Skip to content

Instantly share code, notes, and snippets.

@yildizumut yildizumut/T.py Secret
Last active Aug 13, 2019

Embed
What would you like to do?
Getting the length of prediction time horizon
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
You can’t perform that action at this time.