From d61259d3b9750cbed522c6204ac146c7763594d6 Mon Sep 17 00:00:00 2001 From: liurui Date: Wed, 13 Nov 2024 11:41:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=81=9A=E7=83=AF=E7=83=83?= =?UTF-8?q?=E9=A2=84=E6=B5=8B=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config_juxiting.py | 2 +- lib/dataread.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config_juxiting.py b/config_juxiting.py index f5d2612..16009c6 100644 --- a/config_juxiting.py +++ b/config_juxiting.py @@ -228,7 +228,7 @@ if add_kdj and is_edbnamelist: edbnamelist = edbnamelist+['K','D','J'] ### 模型参数 # y = 'PP:拉丝:1102K:市场价:青州:国家能源宁煤(日)' # 原油指标数据的目标变量 -y = 'AVG(金能大唐久泰青州)' # 原油指标数据的目标变量 +y = 'AVG-金能大唐久泰青州' # 原油指标数据的目标变量 avg_cols = [ 'PP:拉丝:1102K:出厂价:青州:国家能源宁煤(日)', 'PP:拉丝:L5E89:出厂价:华北(第二区域):内蒙古久泰新材料(日)', diff --git a/lib/dataread.py b/lib/dataread.py index d1496c9..7d180b5 100644 --- a/lib/dataread.py +++ b/lib/dataread.py @@ -509,8 +509,8 @@ def datachuli_juxiting(df_zhibiaoshuju,df_zhibiaoliebiao,datecol='date',end_time df.rename(columns={datecol:'ds'},inplace=True) df[offsite_col] = df[offsite_col]-offsite - df['AVG(金能大唐久泰青州)'] = df[avg_cols].mean(axis=1) - print(df[['ds','AVG(金能大唐久泰青州)']+avg_cols].head(20)) + df[y] = df[avg_cols].mean(axis=1) + print(df[['ds',y]+avg_cols].head(20)) # 重命名预测列 df.rename(columns={y:'y'},inplace=True) # 按时间顺序排列