1
This commit is contained in:
parent
13c1eeac94
commit
51102ea516
@ -174,6 +174,8 @@ async def retention_model(
|
||||
tmp.setdefault('d0', len(a))
|
||||
tmp.setdefault('p', []).append(division(len(a & b) * 100, len(a)))
|
||||
tmp.setdefault('n', []).append(len(a & b))
|
||||
tmp.setdefault('p_outflow', []).append(100 - division(len(a & b) * 100, len(a)))
|
||||
tmp.setdefault('n_outflow', []).append(len(a) - len(a & b))
|
||||
groups = set([tuple(i) for i in df[res['groupby']].values])
|
||||
df.set_index(res['groupby'], inplace=True)
|
||||
df.sort_index(inplace=True)
|
||||
|
@ -246,7 +246,7 @@ class BehaviorAnalysis:
|
||||
|
||||
if event_name_b == '*':
|
||||
val_b = func.arrayDistinct(
|
||||
(func.groupArray(func.if_(event_name_col != event_name_a, who_visit, None)))).label('val_b'),
|
||||
(func.groupArray(func.if_(1, who_visit, None)))).label('val_b'),
|
||||
selectd.insert(-2, *val_b)
|
||||
else:
|
||||
val_b = func.arrayDistinct(
|
||||
|
Loading…
Reference in New Issue
Block a user