Commit 8b2eec92 authored by 赵威's avatar 赵威

get event info

parent 55cefdc3
...@@ -30,20 +30,30 @@ def make_dict_from_pair(x): ...@@ -30,20 +30,30 @@ def make_dict_from_pair(x):
def update_tag3_user_portrait_by_event(cl_id): def update_tag3_user_portrait_by_event(cl_id):
user_df = get_tag3_user_log(cl_id) user_df = get_tag3_user_log(cl_id)
if not user_df.empty: if not user_df.empty:
user_df["first_solutions"] = list( user_df["first_solutions"] = list(zip(user_df["first_solutions"].apply(lambda x: x.split(",")), user_df["tag_score"]))
zip(user_df["event_cn"], user_df["first_solutions"].apply(lambda x: x.split(",")), user_df["tag_score"])) user_df["second_solutions"] = list(zip(user_df["second_solutions"].apply(lambda x: x.split(",")), user_df["tag_score"]))
user_df["second_solutions"] = list( user_df["first_demands"] = list(zip(user_df["first_demands"].apply(lambda x: x.split(",")), user_df["tag_score"]))
zip(user_df["event_cn"], user_df["second_solutions"].apply(lambda x: x.split(",")), user_df["tag_score"])) user_df["second_demands"] = list(zip(user_df["second_demands"].apply(lambda x: x.split(",")), user_df["tag_score"]))
user_df["first_demands"] = list( user_df["first_positions"] = list(zip(user_df["first_positions"].apply(lambda x: x.split(",")), user_df["tag_score"]))
zip(user_df["event_cn"], user_df["first_demands"].apply(lambda x: x.split(",")), user_df["tag_score"])) user_df["second_positions"] = list(zip(user_df["second_positions"].apply(lambda x: x.split(",")), user_df["tag_score"]))
user_df["second_demands"] = list( user_df["projects"] = list(zip(user_df["projects"].apply(lambda x: x.split(",")), user_df["tag_score"]))
zip(user_df["event_cn"], user_df["second_demands"].apply(lambda x: x.split(",")), user_df["tag_score"]))
user_df["first_positions"] = list( user_df["first_solutions_dict"] = user_df["first_solutions"].apply(lambda x: make_dict_from_pair(x))
zip(user_df["event_cn"], user_df["first_positions"].apply(lambda x: x.split(",")), user_df["tag_score"])) user_df["second_solutions_dict"] = user_df["second_solutions"].apply(lambda x: make_dict_from_pair(x))
user_df["second_positions"] = list( user_df["first_demands_dict"] = user_df["first_demands"].apply(lambda x: make_dict_from_pair(x))
zip(user_df["event_cn"], user_df["second_positions"].apply(lambda x: x.split(",")), user_df["tag_score"])) user_df["second_demands_dict"] = user_df["second_demands"].apply(lambda x: make_dict_from_pair(x))
user_df["projects"] = list( user_df["first_positions_dict"] = user_df["first_positions"].apply(lambda x: make_dict_from_pair(x))
zip(user_df["event_cn"], user_df["projects"].apply(lambda x: x.split(",")), user_df["tag_score"])) user_df["second_positions_dict"] = user_df["second_positions"].apply(lambda x: make_dict_from_pair(x))
user_df["projects_dict"] = user_df["projects"].apply(lambda x: make_dict_from_pair(x))
user_df["first_solutions_dict"] = {user_df["event_cn"]: user_df["first_solutions_dict"]}
user_df["second_solutions_dict"] = {user_df["event_cn"]: user_df["second_solutions_dict"]}
user_df["first_demands_dict"] = {user_df["event_cn"]: user_df["first_demands_dict"]}
user_df["second_demands_dict"] = {user_df["event_cn"]: user_df["second_demands_dict"]}
user_df["first_positions_dict"] = {user_df["event_cn"]: user_df["first_positions_dict"]}
user_df["second_positions_dict"] = {user_df["event_cn"]: user_df["second_positions_dict"]}
user_df["projects_dict"] = {user_df["event_cn"]: user_df["projects_dict"]}
print(user_df) print(user_df)
return cl_id return cl_id
......
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