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
d0dfca0f
Commit
d0dfca0f
authored
Jun 03, 2021
by
LIANGZEYAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
激光打印机参数提取+修改命名简称获取方式
parent
682d6568
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
更新库内产品数据.py
公共代码/更新库内产品数据.py
+20
-1
激光打印机型号提取.py
公共代码/激光打印机型号提取.py
+0
-0
No files found.
公共代码/更新库内产品数据.py
View file @
d0dfca0f
...
...
@@ -10,12 +10,31 @@ import pymssql
import
pandas
as
pd
from
public
import
Index
import
uuid
import
ast
def
get_simple_value
():
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
.
execute
(
f
"select tip from skuname_named_rule"
)
data
=
(
cursor
.
fetchall
())
export_category
=
pd
.
DataFrame
(
data
,
columns
=
[
tuple
[
0
]
for
tuple
in
cursor
.
description
])
tip_list
=
export_category
[
"tip"
]
.
tolist
()
temp
=
[]
for
i
in
tip_list
:
i
=
ast
.
literal_eval
(
i
)
temp
=
list
(
set
(
temp
+
i
))
conn_zi_new
.
close
()
return
temp
def
transform_simplevalue
(
cursor_zi_new
,
shujuzidiandf
,
categoryname
,
subtitle
,
stdvalue
):
stdvalue
=
stdvalue
.
strip
()
simple_subtitle_list
=
[
'CPU型号'
,
'显存容量'
,
'操作系统'
,
'双面器'
,
'双面输稿器'
,
'网络打印'
,
'标配外服务及配件'
,
'标配外耗材'
,
'镜头描述'
,
'碎纸效果'
,
'产品尺寸'
,
'分辨率'
,
'是否含壁挂架'
,
'是否含底座'
,
'CPU'
,
'内存'
,
'硬盘'
,
'尺寸'
,
'容量'
,
'最大读取速度'
,
'颜色'
,
'最大容积L'
,
'总容积L'
,
'类别'
,
'内存容量'
,
'硬盘容量'
,
'操作系统'
,
'网络连接'
,
'屏幕尺寸'
,
'硬盘尺寸'
,
'容量'
,
'类型'
]
#simple_subtitle_list = ['CPU型号','显存容量','操作系统','双面器','双面输稿器','网络打印','标配外服务及配件','标配外耗材','镜头描述','碎纸效果','产品尺寸','分辨率','是否含壁挂架','是否含底座','CPU','内存','硬盘','尺寸','容量','最大读取速度','颜色','最大容积L','总容积L','类别','内存容量','硬盘容量','操作系统','网络连接','屏幕尺寸','硬盘尺寸','容量','类型']
simple_subtitle_list
=
get_simple_value
()
if
subtitle
not
in
simple_subtitle_list
:
return
stdvalue
...
...
公共代码/激光打印机型号提取.py
View file @
d0dfca0f
This diff is collapsed.
Click to expand it.
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