Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
4342897e
Commit
4342897e
authored
Dec 11, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add data
parent
98479180
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
ffm.py
tensnsorflow/ffm.py
+1
-2
No files found.
tensnsorflow/ffm.py
View file @
4342897e
...
...
@@ -31,7 +31,7 @@ def test():
def
get_data
():
db
=
pymysql
.
connect
(
host
=
'10.66.157.22'
,
port
=
4000
,
user
=
'root'
,
passwd
=
'3SYz54LS9#^9sBvC'
,
db
=
'jerry_test'
)
sql
=
"select device_id,y,z,stat_date,ucity_id,cid_id,clevel1_id,ccity_name from esmm_train_data"
sql
=
"select device_id,y,z,stat_date,ucity_id,cid_id,clevel1_id,ccity_name from esmm_train_data
limit 2000
"
df
=
con_sql
(
db
,
sql
)
df
=
df
.
rename
(
columns
=
{
0
:
"device_id"
,
1
:
"y"
,
2
:
"z"
,
3
:
"stat_date"
,
4
:
"ucity_id"
,
5
:
"cid_id"
,
6
:
"clevel1_id"
,
7
:
"ccity_name"
})
...
...
@@ -99,7 +99,6 @@ def get_statistics(device_tuple):
db
=
pymysql
.
connect
(
host
=
'10.66.157.22'
,
port
=
4000
,
user
=
'root'
,
passwd
=
'3SYz54LS9#^9sBvC'
,
db
=
'eagle'
)
sql
=
"select device_id,device_type,channel,total,精选,直播,鼻部,眼部,微整,牙齿,轮廓,美肤抗衰,"
\
"吸脂,脂肪填充,隆胸,私密,毛发管理,公立,韩国 from home_tab_click where device_id in {}"
.
format
(
device_tuple
)
print
(
sql
)
df
=
con_sql
(
db
,
sql
)
df
=
df
.
rename
(
columns
=
{
0
:
"device_id"
,
1
:
"device_type"
,
2
:
"channel"
,
3
:
"total"
})
for
i
in
df
.
columns
.
difference
([
"device_id"
,
"device_type"
,
"channel"
,
"total"
]):
...
...
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