Commit 0bdea0be authored by 赵威's avatar 赵威

add field

parent 15824b65
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment