Commit 89b3ae79 authored by 张彦钊's avatar 张彦钊

add

parent 20e7c600
...@@ -7,11 +7,12 @@ url="http://doris.paas.test/v1/once" ...@@ -7,11 +7,12 @@ url="http://doris.paas.test/v1/once"
header_dict={'Content-Type': 'application/x-www-form-urlencoded'} header_dict={'Content-Type': 'application/x-www-form-urlencoded'}
param_dict={} param_dict={}
param_dict["method"]="doris/search/doctor_officer" # param_dict["method"]="doris/search/doctor_officer"
param_detail = {"device_id": 'xx',"size": 10,"offset":0, "query": "双眼皮","user_city_tag_id": 328,"is_officer":False} # param_detail = {"device_id": 'xx',"size": 10,"offset":0, "query": "双眼皮","user_city_tag_id": 328,
# "is_officer":False,"filters":{}}
# param_dict["method"]="doris/search/bangdan" param_dict["method"]="doris/search/bangdan"
# param_detail = {"device_id": '2',"size": 10,"offset":0, "user_city_tag_id": 328,"is_officer":False,"unit_ids":[]} param_detail = {"device_id": '2',"size": 10,"offset":0, "user_city_tag_id": -1,"is_officer":False,"unit_ids":[]}
# a = [105, 2941, 780, 102, 873, 2060, 187, 2935, 2108, 912, 928, 2059, 4437, 822, 2866, 2778, 824, 821, 2938] # a = [105, 2941, 780, 102, 873, 2060, 187, 2935, 2108, 912, 928, 2059, 4437, 822, 2866, 2778, 824, 821, 2938]
......
...@@ -62,6 +62,8 @@ def doctor(): ...@@ -62,6 +62,8 @@ def doctor():
"merchant_id","doctor_ad_money_30_days","expand_rechange_amount_30","service_pv_30", "merchant_id","doctor_ad_money_30_days","expand_rechange_amount_30","service_pv_30",
"mexpert_pv_30","organization_pv_30","budan_payment_30_days"] "mexpert_pv_30","organization_pv_30","budan_payment_30_days"]
data = df.loc[:, columns] data = df.loc[:, columns]
data = data.rename(columns=renames)
data = data.drop_duplicates()
data.to_csv('/tmp/doctor.csv',index=False) data.to_csv('/tmp/doctor.csv',index=False)
print("doctor end") print("doctor end")
...@@ -134,11 +136,34 @@ def hospital(): ...@@ -134,11 +136,34 @@ def hospital():
"doctor_ad_money_30_days","service_pv_30","mexpert_pv_30","organization_pv_30", "doctor_ad_money_30_days","service_pv_30","mexpert_pv_30","organization_pv_30",
"doctor_discount_30_days"] "doctor_discount_30_days"]
data = df.loc[:, columns] data = df.loc[:, columns]
renames = {'doctor_id': '机构管理者id',
'score': '得分',
'ctr': '点击率',
'commission': '单pv佣金贡献',
'cpt': '单pv的CPT消耗',
'hospital_id': '医院id',
'hospital_exposure_pv_30': '该医院卡片的曝光-30天',
'service_exposure_pv_30': '该医院名下所有美购的曝光-30天',
'expert_exposure_pv_30': '机构名下所有医生卡片曝光-30天',
'service_ctr_30': '机构名下所有美购ctr-30天',
'hospital_ctr_30': '医院卡片ctr-30天',
'expert_ctr_30': '机构名下所有医生ctr-30天',
'merchant_id': '商户id',
'budan_payment_30_days': '30天已补订单佣金',
'doctor_ad_money_30_days': '商户名下非医生、机构账号的验证订单抽成之和',
'service_pv_30': '该商户名下所有美购的美购详情页PV',
'mexpert_pv_30': '该商户名下所有医生主页PV',
'organization_pv_30': '该商户名下机构主页PV',
'doctor_discount_30_days': '该商户的CPT纯消耗金额'}
data = data.rename(columns=renames)
data = data.drop_duplicates()
print(data.head(6)) print(data.head(6))
data.to_csv('/tmp/hospital.csv',index=False) data.to_csv('/tmp/hospital.csv',index=False,encoding="utf_8_sig")
if __name__ == "__main__": if __name__ == "__main__":
doctor() # doctor()
hospital() hospital()
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