experiments'
This commit is contained in:
@@ -54,18 +54,8 @@ class ControllerDB:
|
||||
# fill dct_lst_init_disrupt_firm_prod
|
||||
list_dct = []
|
||||
if self.is_with_exp:
|
||||
str_sql = "select e_id, count, max_max_ts, " \
|
||||
"dct_lst_init_disrupt_firm_prod from " \
|
||||
"iiabmdb.without_exp_experiment as a " \
|
||||
"inner join " \
|
||||
"(select e_id, count(id) as count, max(max_ts) as max_max_ts "\
|
||||
"from iiabmdb.without_exp_sample as a " \
|
||||
"inner join (select s_id, max(ts) as max_ts from " \
|
||||
"iiabmdb.without_exp_result where ts > 0 group by s_id) as b "\
|
||||
"on a.id = b.s_id " \
|
||||
"group by e_id) as b " \
|
||||
"on a.id = b.e_id " \
|
||||
"order by count desc;"
|
||||
with open('SQL_export_high_risk_setting.sql', 'r') as f:
|
||||
str_sql = f.read()
|
||||
result = pd.read_sql(sql=str_sql, con=engine)
|
||||
result['dct_lst_init_disrupt_firm_prod'] = \
|
||||
result['dct_lst_init_disrupt_firm_prod'].apply(
|
||||
|
||||
Reference in New Issue
Block a user