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
a5316846
Commit
a5316846
authored
Apr 08, 2021
by
Jialin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into master
parents
4fdf2658
cfd2ec69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
上传补充后的数据字典.py
公共代码/上传补充后的数据字典.py
+3
-3
校验参数数据.py
公共代码/校验参数数据.py
+7
-4
No files found.
公共代码/上传补充后的数据字典.py
View file @
a5316846
...
...
@@ -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']}"
)
...
...
公共代码/校验参数数据.py
View file @
a5316846
...
...
@@ -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