Skip to content

Commit

Permalink
Update earthquake_recovery_db.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sjbrandenberg authored Mar 21, 2023
1 parent 4f69c8e commit 8dd9155
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions designsafe_db/earthquake_recovery_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ def read_sql(*args):
if(output=='DataFrame'):
try:
engine = sqlalchemy.create_engine('mysql+pymysql://dspublic:[email protected]:3306/post_earthquake_recovery')
with engine.begin() as con:
data = pd.read_sql_query(sql=text(sql), con=engine)
data = pd.DataFrame(engine.connect().execute(text(sql)))
engine.dispose()
return(data)
except exc.SQLAlchemyError as e:
Expand Down

0 comments on commit 8dd9155

Please sign in to comment.