Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
ZHOUXINGYU_project
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
zhou
ZHOUXINGYU_project
Commits
fce687eb
Commit
fce687eb
authored
Jan 08, 2020
by
sanlu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
驳回非多渠道数据函数
parent
e7e1c876
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
main_merge.py
main_merge.py
+17
-0
No files found.
main_merge.py
View file @
fce687eb
...
@@ -278,6 +278,23 @@ def return_error(table):
...
@@ -278,6 +278,23 @@ def return_error(table):
table
.
columns
=
[
'sku'
,
'name'
,
'url'
,
'source'
,
'remark'
,
'create_time'
]
table
.
columns
=
[
'sku'
,
'name'
,
'url'
,
'source'
,
'remark'
,
'create_time'
]
table
.
to_sql
(
'API_returnErrorData'
,
sql_zi_zh
.
engine
,
if_exists
=
'append'
,
index
=
False
)
table
.
to_sql
(
'API_returnErrorData'
,
sql_zi_zh
.
engine
,
if_exists
=
'append'
,
index
=
False
)
def
return_multi_channel
(
table
):
sql_zi_zh
=
sql_find
(
'zi_zh'
,
False
)
NowTime
=
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
())
#table = pd.read_excel('api_data/ZH_SN_no_category_data_2019-12-27.xlsx', dtype = {'SKU' : str})
table
=
table
[[
'SKU'
,
'产品名称'
,
'url'
,
'来源'
]]
l
=
len
(
table
)
create_time_list
=
[]
remark_list
=
[]
for
i
in
range
(
l
):
create_time_list
.
append
(
NowTime
)
remark_list
.
append
(
'没有多渠道来源'
)
table
[
'remark'
]
=
remark_list
table
[
'create_time'
]
=
create_time_list
table
.
columns
=
[
'sku'
,
'name'
,
'url'
,
'source'
,
'remark'
,
'create_time'
]
table
.
to_sql
(
'API_returnErrorData'
,
sql_zi_zh
.
engine
,
if_exists
=
'append'
,
index
=
False
)
class
data_fetch
():
class
data_fetch
():
def
__init__
(
self
,
model
=
'LXWL_model'
,
localhost
=
True
,
source
=
'ZH_LXWL'
):
def
__init__
(
self
,
model
=
'LXWL_model'
,
localhost
=
True
,
source
=
'ZH_LXWL'
):
'''
'''
...
...
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