1.优化留存分析百分比问题
This commit is contained in:
parent
0fb71488de
commit
af99d85ea0
@ -794,8 +794,8 @@ async def retention_model(request: Request,
|
|||||||
|
|
||||||
# 计算概率
|
# 计算概率
|
||||||
for key1, value1 in new_summary_valuess.items():
|
for key1, value1 in new_summary_valuess.items():
|
||||||
new_summary_valuess[key1]['p'] = [round(i / value1['d0'], 2) for i in value1['n']]
|
new_summary_valuess[key1]['p'] = [round(i*100 / value1['d0'], 2) for i in value1['n']]
|
||||||
new_summary_valuess[key1]['p_outflow'] = [round(i1 / value1['d0'], 2) for i1 in value1['n_outflow']]
|
new_summary_valuess[key1]['p_outflow'] = [round(i1*100 / value1['d0'], 2) for i1 in value1['n_outflow']]
|
||||||
|
|
||||||
title = ['分组项', '用户数', '次留', *[f'{i + 1}留' for i in retention_n[1:]]]
|
title = ['分组项', '用户数', '次留', *[f'{i + 1}留' for i in retention_n[1:]]]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user