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

change

parent 3b7c9de5
......@@ -40,6 +40,8 @@ def get_feed_ctr():
df = df.rename(columns={0: "date_str",1:"diary_exp",2:"diary_click",3:"post_exp",4:"post_click",
5:"qa_exp",6:"qa_click"})
for i in ["date_str","diary_exp","diary_click","post_exp","post_click","qa_exp","qa_click"]:
df[i] = df[i].astype("int")
df["total_exp"] = df["diary_exp"] + df["post_exp"] + df["qa_exp"]
df["total_click"] = df["diary_click"] + df["post_click"] + df["qa_click"]
df["total_ctr"] = df["total_click"]/df["total_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