Created
November 25, 2021 14:58
-
-
Save bkaankuguoglu/f103933348430f13907ef529a99d90af to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def get_datetime_index(df): | |
return ( | |
pd.to_datetime(df.index[-1]) | |
+ (pd.to_datetime(df.index[-1]) - pd.to_datetime(df.index[-2])), | |
pd.to_datetime(df.index[-1]) - pd.to_datetime(df.index[-2]), | |
) | |
start_date, freq = get_datetime_index(y_test) | |
index = pd.date_range(start=start_date, freq=freq, periods=100) | |
df_forecast = pd.DataFrame(index=index) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment