@@ -124,7 +124,7 @@ def apply_ar(last_7, flash_dir, lag, weekday_correction, non_daily_df, fips_pop_
124
124
df_for_ts .columns = ['y' , 'yhat' , 'pop' ]
125
125
ts_streams = bin_approach (df_for_ts , log = True )
126
126
ts_streams .columns = ['test-statistic' ]
127
- return ts_streams , df_for_ts ,
127
+ return ts_streams , df_for_ts
128
128
129
129
130
130
def output (evd_ranking , day , lag , signal , logger ):
@@ -168,9 +168,11 @@ def evd_ranking_fn(ts_streams, flash_dir):
168
168
"""
169
169
EVD_max = pd .read_csv (f'{ flash_dir } /max.csv' , index_col = 0 )
170
170
EVD_min = pd .read_csv (f'{ flash_dir } /min.csv' , index_col = 0 )
171
- evd_ranking = pd .concat ([ts_streams .apply (lambda x : ts_val (x .values [0 ], EVD_min ['0' ]), axis = 1 ).sort_values (),
172
- ts_streams .apply (lambda x :
173
- 1 - ts_val (x .values [0 ], EVD_max ['0' ]), axis = 1 ).sort_values ()], axis = 1 ).max (axis = 1 )
171
+ evd_ranking = pd .concat ([ts_streams .apply (lambda x : ts_val (x .values [0 ],
172
+ EVD_min ['0' ]), axis = 1 ).sort_values (),
173
+ ts_streams .apply (lambda x :
174
+ 1 - ts_val (x .values [0 ], EVD_max ['0' ]),
175
+ axis = 1 ).sort_values ()], axis = 1 ).max (axis = 1 )
174
176
evd_ranking .name = 'evd_ranking'
175
177
return evd_ranking
176
178
0 commit comments