Commit a5316846 authored by Jialin's avatar Jialin

Merge remote-tracking branch 'origin/master' into master

parents 4fdf2658 cfd2ec69
......@@ -20,13 +20,13 @@ def ComplicatedDataDict(path):
df = pd.read_excel(path)
process_index = 0
index = Index()
index_ = Index()
for index,row in df.iterrows():
try:
print(index(process_index,len(df)-1), end='%')
print(index_(process_index,len(df)-1), end='%')
except:
print(index(process_index,1), end='%')
print(index_(process_index,1), end='%')
process_index+=1
cursor_zi_new.execute(f"update ShuJuZiDian_Cfg set stdvalue = '{row['stdvalue']}',simplevalue = '{row['simplevalue']}' where id = {row['id']}")
......
......@@ -130,10 +130,13 @@ def check_data(category_name,path):
init_fraction = fraction
recommend_pri = dict_pri
recommend_stdvalue = data_dict[data_dict['primitive'] == recommend_pri]['stdvalue'].tolist()[0]
recommend_simplevalue = data_dict[data_dict['primitive'] == recommend_pri]['simplevalue'].tolist()[0]
try:
recommend_stdvalue = data_dict[data_dict['primitive'] == recommend_pri]['stdvalue'].tolist()[0]
recommend_simplevalue = data_dict[data_dict['primitive'] == recommend_pri]['simplevalue'].tolist()[0]
except:
recommend_stdvalue = '无'
recommend_simplevalue = '无'
flag = True
cursor_zi_new.execute(f"insert into ShuJuZiDian_Cfg (categoryname,subtitle,primitive,eg_brand_name,eg_product_name,recommend_primitive,recommend_stdvalue,recommend_simplevalue) \
values ('{category_name}','{db_param}','{pri_value}','{eg_brand_name}','{eg_product_name}','{recommend_pri}','{recommend_stdvalue}','{recommend_simplevalue}')")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment