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
cb4fd4af
Commit
cb4fd4af
authored
6 years ago
by
张彦钊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multi hot insert database
parent
2ff68205
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
feature_engineering.py
tensnsorflow/feature_engineering.py
+2
-0
No files found.
tensnsorflow/feature_engineering.py
View file @
cb4fd4af
...
@@ -54,10 +54,12 @@ def get_data():
...
@@ -54,10 +54,12 @@ def get_data():
for
i
in
features
:
for
i
in
features
:
df
[
i
]
=
df
[
i
]
.
astype
(
"str"
)
df
[
i
]
=
df
[
i
]
.
astype
(
"str"
)
df
[
i
]
=
df
[
i
]
.
fillna
(
"lost"
)
df
[
i
]
=
df
[
i
]
.
fillna
(
"lost"
)
# 下面这行代码是为了区分不同的列中有相同的值
df
[
i
]
=
df
[
i
]
+
i
df
[
i
]
=
df
[
i
]
+
i
unique_values
.
extend
(
list
(
df
[
i
]
.
unique
()))
unique_values
.
extend
(
list
(
df
[
i
]
.
unique
()))
df
[
"l2"
]
=
df
[
"l2"
]
.
astype
(
"str"
)
df
[
"l2"
]
=
df
[
"l2"
]
.
astype
(
"str"
)
df
[
"l2"
]
=
df
[
"l2"
]
.
fillna
(
"lost"
)
df
[
"l2"
]
=
df
[
"l2"
]
.
fillna
(
"lost"
)
# l1和l2中的值允许相同
df
[
"l2"
]
=
df
[
"l2"
]
+
"l1"
df
[
"l2"
]
=
df
[
"l2"
]
+
"l1"
unique_values
.
extend
(
list
(
df
[
"l2"
]
.
unique
()))
unique_values
.
extend
(
list
(
df
[
"l2"
]
.
unique
()))
...
...
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