|
@@ -249,7 +249,7 @@ def tech_anal(stocks, hlfx_pool, hlfx_pool_daily, err_list):
|
|
|
df = df.reset_index(drop=True)
|
|
|
# print(stock, '\n', df[['open_front', 'HL']])
|
|
|
df = df.replace([np.inf, -np.inf], np.nan)
|
|
|
- df.to_sql('%s_1d' % stock, con=engine_tech.connect(), index=False, if_exists='replace')
|
|
|
+ df.to_sql('%s_1d' % stock, con=engine_tech, index=False, if_exists='replace')
|
|
|
# with engine.connect() as con:
|
|
|
# con.execute("ALTER TABLE `%s_1d` ADD PRIMARY KEY (`time`);" % stock)
|
|
|
except BaseException:
|