调整留存和ltv

This commit is contained in:
wuaho 2021-11-04 17:29:59 +08:00
parent b37987e845
commit 04d47e2143
2 changed files with 3 additions and 2 deletions

View File

@ -771,7 +771,8 @@ ORDER BY values desc"""
days = (arrow.get(self.end_date).date() - arrow.get(self.start_date).date()).days days = (arrow.get(self.end_date).date() - arrow.get(self.start_date).date()).days
keep = [] keep = []
cnt = [] cnt = []
retention_n = [*[k for k in range(1, 61)], 90, 120, 180, 240, 300, 360] retention_n = [*[k for k in range(1, 61)], 70, 75, 80, 85, 90, 95, 100, 110, 120, 150, 180, 210, 240, 270, 300,
360]
""" """
cnt0-cnt1 as on1, cnt0-cnt1 as on1,

View File

@ -132,7 +132,7 @@ class XAnalysis:
sumpay = [] sumpay = []
sum_money = [] sum_money = []
# for i in range(1, days + 2): # for i in range(1, days + 2):
ltv_n = [*[k for k in range(1, 61)], 90, 120, 180, 240, 300, 360] ltv_n = [*[k for k in range(1, 61)], 70, 75, 80, 85, 90, 95, 100, 110, 120, 150, 180, 210, 240, 270, 300, 360]
for i in ltv_n: for i in ltv_n:
# select_ltv.append(func.round(sa.Column(f'sumpay_{i}') / sa.Column('cnt1'), 2).label(f'LTV{i}')) # select_ltv.append(func.round(sa.Column(f'sumpay_{i}') / sa.Column('cnt1'), 2).label(f'LTV{i}'))
select_ltv.append( select_ltv.append(