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
f1a8239a
Commit
f1a8239a
authored
Dec 11, 2018
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add data
parent
3b4f0890
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ffm.py
tensnsorflow/ffm.py
+2
-2
No files found.
tensnsorflow/ffm.py
View file @
f1a8239a
...
...
@@ -48,7 +48,7 @@ def get_data():
print
(
"shape"
)
print
(
df
.
shape
)
device_tuple
=
tuple
(
set
(
df
[
"device_id"
]
.
values
.
tolist
()))
df
=
pd
.
merge
(
df
,
get_statistics
(
device_tuple
),
on
=
"device_id"
,
how
=
'left'
)
.
fillna
(
0
)
df
=
pd
.
merge
(
df
,
get_statistics
(
)
,
how
=
'left'
)
.
fillna
(
0
)
print
(
"merge"
)
print
(
df
.
head
())
print
(
"shape"
)
...
...
@@ -95,7 +95,7 @@ def transform(df):
# pd.io.sql.to_sql(temp, table, yconnect, schema='jerry_test', if_exists='append', index=False)
# print("insert done")
def
get_statistics
(
device_tuple
):
def
get_statistics
():
db
=
pymysql
.
connect
(
host
=
'10.66.157.22'
,
port
=
4000
,
user
=
'root'
,
passwd
=
'3SYz54LS9#^9sBvC'
,
db
=
'eagle'
)
sql
=
"select device_id,device_type,total,精选,直播,鼻部,眼部,微整,牙齿,轮廓,美肤抗衰,"
\
"吸脂,脂肪填充,隆胸,私密,毛发管理,公立,韩国 from home_tab_click"
...
...
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