Created
September 6, 2022 14:55
-
-
Save Kazanskyi/fca3fc3826f64fd55563dc56c1fbda14 to your computer and use it in GitHub Desktop.
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
df_15_val.reset_index(inplace = True) | |
ypred_15 = pd.Series(ypred_15) | |
df_15_val = df_15_val.join(ypred_15.rename('15d_forecast'), how = 'left') | |
df_15_val["True_Forecasted"] = df_15_val.future_15dprice_class.astype(str) + " " + df_15_val["15d_forecast"].astype(str) | |
df_15_val[["future_15dprice_change", "True_Forecasted"]].groupby("True_Forecasted").agg({'future_15dprice_change': ['mean', 'median','min', 'max',]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment