Skip to content

Commit 0821aee

Browse files
committed
Remove unused code from users per week
1 parent 6b6bcc7 commit 0821aee

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

users_per_week.py

-22
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,9 @@
66
import infra.dask
77
import infra.pd
88
import infra.platform
9-
import dask.config
10-
import dask.dataframe
11-
import dask.distributed
129
import datetime
13-
import math
14-
import numpy as np
1510
import pandas as pd
1611

17-
# Configs
18-
day_intervals = 7
19-
# IMPORTANT: Run get_data_range() to update these values when loading in a new dataset!
20-
max_date = infra.constants.MAX_DATE
21-
22-
def cohort_as_date_interval(x):
23-
cohort_start = max_date - datetime.timedelta(day_intervals * x + day_intervals - 1)
24-
cohort_end = max_date - datetime.timedelta(day_intervals * x)
25-
26-
return cohort_start.strftime("%Y/%m/%d") + "-" + cohort_end.strftime("%Y/%m/%d")
27-
28-
def get_cohort(x):
29-
return x["start"].apply(lambda x_1: (max_date - x_1).days // day_intervals, meta=('start', 'int64'))
30-
31-
def get_date(x):
32-
return x["cohort"].apply(cohort_as_date_interval, meta=('cohort', 'object'))
33-
3412

3513
def get_registered_users_query(transactions):
3614
# Set down the types for the dataframe

0 commit comments

Comments
 (0)