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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
模板建库func.py
模板建库func.py
+8
-1
No files found.
模板建库func.py
View file @
39ed01e0
...
@@ -619,6 +619,11 @@ def save_collect_data_info(path,std_value_dict):
...
@@ -619,6 +619,11 @@ 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,7 +652,7 @@ def save_collect_data_info(path,std_value_dict):
...
@@ -647,7 +652,7 @@ 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
)
subtitle_list
.
append
(
params
)
...
@@ -665,6 +670,8 @@ def save_collect_data_info(path,std_value_dict):
...
@@ -665,6 +670,8 @@ def save_collect_data_info(path,std_value_dict):
subtitle_list
.
append
(
params
)
subtitle_list
.
append
(
params
)
value_list
.
append
(
list
(
std_value_dict
[
id_
][
params
]
.
keys
())[
0
])
value_list
.
append
(
list
(
std_value_dict
[
id_
][
params
]
.
keys
())[
0
])
else
:
continue
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