Commit bbd3f354 authored by 张彦钊's avatar 张彦钊

add

parent 55da6c2f
......@@ -147,7 +147,9 @@ def hospital():
df = df.rename(columns=dict(zip(list(range(len(name))), name)))
print("df")
print(df.shape)
print(df.head(6))
df = df.dropna(subset=["merchant_id"])
print("drop")
print(df.shape)
sql = "select merchant_id,doctor_discount_30_days," \
"service_pv_30,expert_pv_30,organization_pv_30,expand_rechange_amount_30 from statistic_merchant_rank_factor " \
......@@ -163,8 +165,8 @@ def hospital():
tmp = tmp.rename(columns=dict(zip(list(range(len(name))), name)))
print("tmp")
print(tmp.shape)
print(tmp.head(6))
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')
......
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