Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_strategy_cvr
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rank
gm_strategy_cvr
Commits
0bdea0be
Commit
0bdea0be
authored
Jul 21, 2020
by
赵威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add field
parent
15824b65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fe.py
src/models/esmm/fe.py
+3
-3
No files found.
src/models/esmm/fe.py
View file @
0bdea0be
...
...
@@ -86,9 +86,9 @@ def diary_feature_engineering(df):
diary_df
[
"first_positions"
]
=
diary_df
[
"first_positions"
]
.
apply
(
lambda
d
:
d
if
isinstance
(
d
,
list
)
else
[])
diary_df
[
"second_positions"
]
=
diary_df
[
"second_positions"
]
.
apply
(
lambda
d
:
d
if
isinstance
(
d
,
list
)
else
[])
diary_df
[
"projects"
]
=
diary_df
[
"projects"
]
.
apply
(
lambda
d
:
d
if
isinstance
(
d
,
list
)
else
[])
diary_df
[
"is_pure_author"
]
.
map
(
str_bool_map
)
diary_df
[
"is_have_pure_reply"
]
.
map
(
str_bool_map
)
diary_df
[
"is_have_reply"
]
.
map
(
str_bool_map
)
diary_df
[
"is_pure_author"
]
.
replace
(
str_bool_map
)
diary_df
[
"is_have_pure_reply"
]
.
replace
(
str_bool_map
)
diary_df
[
"is_have_reply"
]
.
replace
(
str_bool_map
)
diary_df
[
"is_pure_author"
]
=
diary_df
[
"is_pure_author"
]
.
astype
(
int
)
diary_df
[
"is_have_pure_reply"
]
=
diary_df
[
"is_have_pure_reply"
]
.
astype
(
int
)
diary_df
[
"is_have_reply"
]
=
diary_df
[
"is_have_reply"
]
.
astype
(
int
)
...
...
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