Commit 55da6c2f authored by 张彦钊's avatar 张彦钊

add

parent d212d169
......@@ -73,8 +73,9 @@ def doctor():
name = ["merchant_id", "doctor_discount_30_days", "expand_rechange_amount_30", "service_pv_30",
"mexpert_pv_30", "organization_pv_30"]
tmp = tmp.rename(columns=dict(zip(list(range(len(name))), name)))
print(tmp.head(6))
df = df.dropna()
df["merchant_id"] = df["merchant_id"].astype('int64')
df["merchant_id"] = df["merchant_id"].astype("str")
tmp["merchant_id"] = tmp["merchant_id"].astype("str")
df = pd.merge(df, tmp, on='merchant_id')
......@@ -117,6 +118,7 @@ def doctor():
data = df.loc[:, columns]
data = data.drop_duplicates()
print(data.shape)
data.to_csv('/tmp/1_doctor.csv',index=False)
print("doctor end")
......@@ -218,8 +220,8 @@ def hospital():
if __name__ == "__main__":
# doctor()
doctor()
# hospital()
exp()
# exp()
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