保存预测,去掉index列

This commit is contained in:
workpc 2025-02-11 10:53:36 +08:00
parent 80f50eea71
commit e23e1b1362

View File

@ -196,6 +196,8 @@ def ex_Model(df,horizon,input_size,train_steps,val_check_steps,early_stop_patien
#进行未来时间预测
df_predict=nf.predict(df_test).reset_index()
# 去掉index列
df_predict.drop(columns=['index'], inplace=True)
df_predict.astype({col: 'float32' for col in df_predict.columns if col not in ['ds'] })
# 添加预测时间