Created
August 7, 2022 14:08
-
-
Save khuyentran1401/c5fa3823c04be3560bb132cda5c8e40b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import create_engine | |
engine = create_engine( | |
f"postgresql://{connection.user}:{connection.password}@{connection.host}/{connection.database}", | |
) | |
query = f'SELECT * FROM "{name}"' | |
df = pd.read_sql(query, con=engine) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment