Commit e970d1af authored by 赵威's avatar 赵威

update dateframe field name

parent 89b8f476
......@@ -273,13 +273,13 @@ def diary_feature_engineering(df):
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 [])
df["first_demands_num"] = df["first_demands"].apply(lambda d: len(d))
df["second_demands_num"] = df["second_demands"].apply(lambda d: len(d))
df["first_solutions_num"] = df["first_solutions"].apply(lambda d: len(d))
df["second_solutions_num"] = df["second_solutions"].apply(lambda d: len(d))
df["first_positions_num"] = df["first_positions"].apply(lambda d: len(d))
df["second_positions_num"] = df["second_positions"].apply(lambda d: len(d))
df["projects_num"] = df["projects"].apply(lambda d: len(d))
diary_df["first_demands_num"] = diary_df["first_demands"].apply(lambda d: len(d))
diary_df["second_demands_num"] = diary_df["second_demands"].apply(lambda d: len(d))
diary_df["first_solutions_num"] = diary_df["first_solutions"].apply(lambda d: len(d))
diary_df["second_solutions_num"] = diary_df["second_solutions"].apply(lambda d: len(d))
diary_df["first_positions_num"] = diary_df["first_positions"].apply(lambda d: len(d))
diary_df["second_positions_num"] = diary_df["second_positions"].apply(lambda d: len(d))
diary_df["projects_num"] = diary_df["projects"].apply(lambda d: len(d))
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)
......
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