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
14340671
Commit
14340671
authored
Jul 16, 2021
by
rico.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
b28bbb11
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
更新库内产品数据.py
公共代码/更新库内产品数据.py
+6
-5
No files found.
公共代码/更新库内产品数据.py
View file @
14340671
...
@@ -15,19 +15,19 @@ import ast
...
@@ -15,19 +15,19 @@ import ast
def
get_simple_value
():
def
get_simple_value
():
conn_zi_new
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'zgcprice20200628'
,
database
=
'ZI_NEW'
,
autocommit
=
True
)
conn_zi_new
=
pymssql
.
connect
(
host
=
'123.56.115.207'
,
user
=
'zgcprice3311'
,
password
=
'zgcprice20200628'
,
database
=
'ZI_NEW'
,
autocommit
=
True
)
cursor
=
conn_zi_new
.
cursor
()
cursor
=
conn_zi_new
.
cursor
()
cursor
.
execute
(
f
"select tip from skuname_named_rule"
)
cursor
.
execute
(
f
"select
categoryname,
tip from skuname_named_rule"
)
data
=
(
cursor
.
fetchall
())
data
=
(
cursor
.
fetchall
())
export_category
=
pd
.
DataFrame
(
data
,
columns
=
[
tuple
[
0
]
for
tuple
in
cursor
.
description
])
export_category
=
pd
.
DataFrame
(
data
,
columns
=
[
tuple
[
0
]
for
tuple
in
cursor
.
description
])
'''
tip_list = export_category["tip"].tolist()
tip_list = export_category["tip"].tolist()
temp = []
temp = []
for i in tip_list:
for i in tip_list:
i = ast.literal_eval(i)
i = ast.literal_eval(i)
temp = list(set(temp+i))
temp = list(set(temp+i))
'''
conn_zi_new
.
close
()
conn_zi_new
.
close
()
return
temp
return
export_category
def
transform_simplevalue
(
simple_subtitle_list
,
shujuzidiandf
,
categoryname
,
subtitle
,
stdvalue
):
def
transform_simplevalue
(
simple_subtitle_list
,
shujuzidiandf
,
categoryname
,
subtitle
,
stdvalue
):
...
@@ -134,7 +134,8 @@ def upload_params_data(category,path):
...
@@ -134,7 +134,8 @@ def upload_params_data(category,path):
single_data_dict
=
data_dict
single_data_dict
=
data_dict
#获取需要转换简称的参数列表
#获取需要转换简称的参数列表
simple_subtitle_list
=
get_simple_value
()
simple_subtitle_df
=
get_simple_value
()
simple_subtitle_list
=
simple_subtitle_df
[
simple_subtitle_df
[
'categoryname'
]
==
category
][
'tip'
]
.
tolist
()
process_index
=
0
process_index
=
0
index_
=
Index
()
index_
=
Index
()
...
...
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