聚烯烃存储预测值日期格式转换

This commit is contained in:
liurui 2024-11-25 22:33:52 +08:00
parent 74e6ccb79a
commit 560935bfbe
4 changed files with 12584 additions and 10052 deletions

View File

@ -221,6 +221,7 @@ is_update_report = False # 是否上传报告
# 数据截取日期
end_time = '' # 数据截取日期
freq = 'B' # 时间频率,"D": 天 "W": 周"M": 月"Q": 季度"A": 年 "H": 小时 "T": 分钟 "S": 秒 "B": 工作日
delweekenday = True
is_corr = False # 特征是否参与滞后领先提升相关系数
add_kdj = False # 是否添加kdj指标

File diff suppressed because one or more lines are too long

10107
logs/pricepredict.log.3 Normal file

File diff suppressed because one or more lines are too long

View File

@ -665,11 +665,13 @@ def model_losss_juxiting(sqlitedb):
else:
for row in df_combined3.itertuples(index=False):
row_dict = row._asdict()
print(row_dict)
check_query = sqlitedb.select_data('testandpredict_groupby',where_condition = f"ds = '{row.ds}'")
if len(check_query) > 0:
set_clause = ", ".join([f"{key} = '{value}'" for key, value in row_dict.items()])
sqlitedb.update_data('testandpredict_groupby',set_clause,where_condition = f"ds = '{row.ds}'")
continue
row_dict['ds'] = row.ds.strftime('%Y-%m-%d 00:00:00')
sqlitedb.insert_data('testandpredict_groupby',tuple(row_dict.values()),columns=row_dict.keys())