Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sqlalchemy import create_engine
- import pandas pd
- def _get_hm_eng():
- """Return the engine for the HM db"""
- hm_db_type = 'postgresql'
- hm_user = ''
- hm_pass = ''
- hm_address = ''
- return create_engine('{}://{}:{}@{}'.format(hm_db_type,
- hm_user,
- hm_pass,
- hm_address))
- eng = _get_hm_eng()
- df = pd.read_sql_query(qry, eng)
Add Comment
Please, Sign In to add comment