Commit 4bffdd40 authored by 张彦钊's avatar 张彦钊

add

parent 5bc958d9
...@@ -61,7 +61,6 @@ def doctor(): ...@@ -61,7 +61,6 @@ def doctor():
df["commission"] = (df["doctor_discount_30_days"] + df["budan_payment_30_days"])/df["tmp"] df["commission"] = (df["doctor_discount_30_days"] + df["budan_payment_30_days"])/df["tmp"]
df["pv_ad"] = df["expand_rechange_amount_30"]/df["tmp"] df["pv_ad"] = df["expand_rechange_amount_30"]/df["tmp"]
df["score"] = df["ctr"]**0.5 * (df["commission"] + df["pv_ad"])
df.loc[df["all_exposure"] <= 1500, ["ctr"]] = 0.01 df.loc[df["all_exposure"] <= 1500, ["ctr"]] = 0.01
df.loc[df["ctr"] < 0.01, ["ctr"]] = 0.01 df.loc[df["ctr"] < 0.01, ["ctr"]] = 0.01
...@@ -71,6 +70,8 @@ def doctor(): ...@@ -71,6 +70,8 @@ def doctor():
df.loc[df["pv_ad"] > 20, ["pv_ad"]] = 20 df.loc[df["pv_ad"] > 20, ["pv_ad"]] = 20
df.loc[df["pv_ad"] < 0.01, ["pv_ad"]] = 0.01 df.loc[df["pv_ad"] < 0.01, ["pv_ad"]] = 0.01
df["score"] = df["ctr"] ** 0.5 * (df["commission"] + df["pv_ad"])
columns = ["doctor_id","score","ctr","commission","pv_ad","service_exposure_pv_30", columns = ["doctor_id","score","ctr","commission","pv_ad","service_exposure_pv_30",
"service_ctr_30","expert_exposure_pv_30","expert_pv_30", "service_ctr_30","expert_exposure_pv_30","expert_pv_30",
"merchant_id","doctor_discount_30_days","expand_rechange_amount_30","service_pv_30", "merchant_id","doctor_discount_30_days","expand_rechange_amount_30","service_pv_30",
...@@ -146,7 +147,6 @@ def hospital(): ...@@ -146,7 +147,6 @@ def hospital():
df["commission"] = (df["doctor_discount_30_days"] + df["budan_payment_30_days"])/df["tmp"] df["commission"] = (df["doctor_discount_30_days"] + df["budan_payment_30_days"])/df["tmp"]
df["cpt"] = df["expand_rechange_amount_30"]/df["tmp"] df["cpt"] = df["expand_rechange_amount_30"]/df["tmp"]
df["score"] = df["ctr"]**0.5 * (df["commission"] + df["cpt"])
df.loc[df["all_exposure"] <= 1500, ["ctr"]] = 0.01 df.loc[df["all_exposure"] <= 1500, ["ctr"]] = 0.01
df.loc[df["ctr"] < 0.01, ["ctr"]] = 0.01 df.loc[df["ctr"] < 0.01, ["ctr"]] = 0.01
...@@ -156,6 +156,8 @@ def hospital(): ...@@ -156,6 +156,8 @@ def hospital():
df.loc[df["commission"] > 20, ["commission"]] = 20 df.loc[df["commission"] > 20, ["commission"]] = 20
df.loc[df["commission"] < 0.01, ["commission"]] = 0.01 df.loc[df["commission"] < 0.01, ["commission"]] = 0.01
df["score"] = df["ctr"] ** 0.5 * (df["commission"] + df["cpt"])
columns = ["doctor_id","score","ctr","commission","cpt","hospital_id","hospital_exposure_pv_30", columns = ["doctor_id","score","ctr","commission","cpt","hospital_id","hospital_exposure_pv_30",
"service_exposure_pv_30","expert_exposure_pv_30", "service_exposure_pv_30","expert_exposure_pv_30",
"service_ctr_30","hospital_ctr_30","expert_ctr_30","merchant_id","budan_payment_30_days", "service_ctr_30","hospital_ctr_30","expert_ctr_30","merchant_id","budan_payment_30_days",
......
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