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
5a4b604d
Commit
5a4b604d
authored
Jan 04, 2019
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add device_read
parent
5799b9ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
device_read_time_normal.py
tensnsorflow/device_read_time_normal.py
+3
-1
No files found.
tensnsorflow/device_read_time_normal.py
View file @
5a4b604d
...
...
@@ -28,7 +28,9 @@ def normal():
device_id
=
df
[[
"device_id"
]]
df
=
df
.
drop
(
"device_id"
,
axis
=
1
)
minMax
=
MinMaxScaler
()
result
=
minMax
.
fit_transform
(
df
)
result
=
pd
.
DataFrame
(
minMax
.
fit_transform
(
df
),
columns
=
[
"0"
,
"1"
,
"10"
,
"1024"
,
"1080"
,
"11"
,
"12"
,
"13"
,
"2"
,
"2054"
,
"2214"
,
"3"
,
"4"
,
"5"
,
"6933"
,
"7"
,
"9"
,
"922"
,
"929"
,
"971"
,
"992"
])
result
=
device_id
.
join
(
result
)
yconnect
=
create_engine
(
'mysql+pymysql://root:3SYz54LS9#^9sBvC@10.66.157.22:4000/jerry_test?charset=utf8'
)
pd
.
io
.
sql
.
to_sql
(
result
,
"device_read_time_normal"
,
yconnect
,
schema
=
'jerry_test'
,
if_exists
=
'fail'
,
index
=
False
)
...
...
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