Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
重
重点类信息提取
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZGC_INDEX
重点类信息提取
Commits
38bb2227
Commit
38bb2227
authored
Apr 07, 2021
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理未能推荐的数据
parent
ac0f7adb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
校验参数数据.py
公共代码/校验参数数据.py
+7
-4
No files found.
公共代码/校验参数数据.py
View file @
38bb2227
...
...
@@ -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}')"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment