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

修改保留位数

parent 7c6dad67
......@@ -49,7 +49,7 @@ def ctr_all():
cover = len(day_all & set(device_id))
print("当天尾号5或6活跃用户覆盖数:")
print(cover)
cover_percent = cover / len(day_all)
cover_percent = format(cover / len(day_all),".3f")
print("当天尾号5或6活跃用户覆盖率:")
print(cover_percent)
sql_click = "select count(cid) from data_feed_click " \
......@@ -65,7 +65,7 @@ def ctr_all():
exp = cursor.fetchone()[0]
print("曝光数:" + str(exp))
print("点击率:" + str(click / exp))
return len(day_all),cover,cover_percent,click,exp,click / exp
return len(day_all),cover,cover_percent,click,exp,format(click/exp,".6f")
def ctr():
......@@ -85,7 +85,7 @@ def ctr():
print("实验用户曝光数:"+str(exp))
print("实验用户点击率:"+str(click/exp))
return click,exp,click/exp
return click,exp,format(click/exp,".6f")
def rate2file():
......
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