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
39ed01e0
Commit
39ed01e0
authored
Apr 16, 2021
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
60dd1d66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
模板建库func.py
模板建库func.py
+23
-16
No files found.
模板建库func.py
View file @
39ed01e0
...
@@ -618,7 +618,12 @@ def save_collect_data_info(path,std_value_dict):
...
@@ -618,7 +618,12 @@ def save_collect_data_info(path,std_value_dict):
#获取重点类列表
#获取重点类列表
cursor_zi_new
.
execute
(
f
"select category_name from important_category"
)
cursor_zi_new
.
execute
(
f
"select category_name from important_category"
)
point_category_list
=
pd
.
DataFrame
(
cursor_zi_new
.
fetchall
(),
columns
=
[
tuple
[
0
]
for
tuple
in
cursor_zi_new
.
description
])[
'category_name'
]
.
tolist
()
point_category_list
=
pd
.
DataFrame
(
cursor_zi_new
.
fetchall
(),
columns
=
[
tuple
[
0
]
for
tuple
in
cursor_zi_new
.
description
])[
'category_name'
]
.
tolist
()
cursor_zi_new
.
execute
(
"select * from vw_property"
)
db_params
=
pd
.
DataFrame
(
cursor_zi_new
.
fetchall
(),
columns
=
[
tuple
[
0
]
for
tuple
in
cursor_zi_new
.
description
])
db_params
[
'standard_param'
]
=
db_params
[
'identy'
]
.
apply
(
lambda
x
:
x
[
2
])
db_params
=
db_params
[
db_params
[
'standard_param'
]
!=
'0'
]
db_params
[
'subtitle'
]
=
db_params
[
'subtitle'
]
.
apply
(
lambda
x
:
x
.
strip
())
#实例化进度条
#实例化进度条
index_
=
ProgressLine
()
index_
=
ProgressLine
()
...
@@ -647,24 +652,26 @@ def save_collect_data_info(path,std_value_dict):
...
@@ -647,24 +652,26 @@ def save_collect_data_info(path,std_value_dict):
for
index
,
row
in
necessary_single_df
.
iterrows
():
for
index
,
row
in
necessary_single_df
.
iterrows
():
id_
=
int
(
id_
)
id_
=
int
(
id_
)
params
=
row
[
'param'
]
params
=
row
[
'param'
]
if
params
in
cat_subtitle_list
:
if
params
==
'CPU型号'
:
if
params
==
'CPU型号'
:
subtitle_list
.
append
(
params
)
cpu_model
=
list
(
std_value_dict
[
id_
][
params
]
.
keys
())[
0
]
subtitle_list
.
append
(
params
)
value_list
.
append
(
cpu_model
)
cpu_model
=
list
(
std_value_dict
[
id_
][
params
]
.
keys
())[
0
]
value_list
.
append
(
cpu_model
)
subtitle_list
.
append
(
'CPU属性'
)
if
'飞腾'
in
cpu_model
or
'龙芯'
in
cpu_model
or
'兆芯'
in
cpu_model
:
subtitle_list
.
append
(
'CPU属性'
)
pass
if
'飞腾'
in
cpu_model
or
'龙芯'
in
cpu_model
or
'兆芯'
in
cpu_model
:
else
:
pass
cpu_model
=
cpu_model
.
split
(
'-'
)[
0
]
value_list
.
append
(
cpu_model
)
else
:
else
:
cpu_model
=
cpu_model
.
split
(
'-'
)[
0
]
value_list
.
append
(
cpu_model
)
subtitle_list
.
append
(
params
)
value_list
.
append
(
list
(
std_value_dict
[
id_
][
params
]
.
keys
())[
0
])
else
:
else
:
continue
subtitle_list
.
append
(
params
)
value_list
.
append
(
list
(
std_value_dict
[
id_
][
params
]
.
keys
())[
0
])
params_dict
=
str
(
dict
(
zip
(
subtitle_list
+
unnecessary_single_df
[
'param'
]
.
tolist
(),
value_list
+
unnecessary_single_df
[
'value'
]
.
tolist
())))
.
replace
(
"'"
,
"''"
)
params_dict
=
str
(
dict
(
zip
(
subtitle_list
+
unnecessary_single_df
[
'param'
]
.
tolist
(),
value_list
+
unnecessary_single_df
[
'value'
]
.
tolist
())))
.
replace
(
"'"
,
"''"
)
...
...
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