Commit 85b24375 authored by 高雅喆's avatar 高雅喆

add stat_device_order_portrait_score_1106_1206

parent f837f92e
......@@ -24,6 +24,7 @@ def get_user_service_portrait(x, all_word_tags, all_tag_tag_type, all_3tag_2tag,
pay_time = x[0]
cl_id = x[1]
order_tag_id = x[2]
order_tag_id_score = 0.0
user_df_service = get_user_log(cl_id, all_word_tags, pay_time=pay_time)
# 增加df字段(days_diff_now, tag_type, tag2)
......@@ -55,12 +56,10 @@ def get_user_service_portrait(x, all_word_tags, all_tag_tag_type, all_3tag_2tag,
)
gmkv_tag_score2_sum = tag_score_sum[["tag2", "tag_score"]][:size].to_dict('record')
gmkv_tag_score2_sum_dict = {i["tag2"]: i["tag_score"] for i in gmkv_tag_score2_sum}
order_tag_id_score = gmkv_tag_score2_sum_dict.get(int(order_tag_id), 0)
if not portrait_result:
order_tag_id_score = 0
order_tag_id_score = gmkv_tag_score2_sum_dict.get(int(order_tag_id), 0.0)
return pay_time, cl_id, order_tag_id, order_tag_id_score
else:
return pay_time, cl_id, order_tag_id, 0
return pay_time, cl_id, order_tag_id, 0.0
# 获取近一个月设备下单的时间、设备id、标签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