聚烯烃存储预测值日期格式转换
This commit is contained in:
parent
74e6ccb79a
commit
560935bfbe
@ -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指标
|
||||
|
12600
logs/pricepredict.log.1
12600
logs/pricepredict.log.1
File diff suppressed because one or more lines are too long
10107
logs/pricepredict.log.3
Normal file
10107
logs/pricepredict.log.3
Normal file
File diff suppressed because one or more lines are too long
@ -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())
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user