Created
August 16, 2023 12:51
-
-
Save dieissonmartins/a4aad6e4afd073d36a9e0a865f3eb1e0 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
import sqlalchemy | |
# Create a connection to the sales database | |
db_engine = sqlalchemy.create_engine("postgresql+psycopg2://repl:password@localhost:5432/sales") | |
# Query all rows and columns of the sales table | |
raw_sales_data = pd.read_sql("SELECT * FROM sales", db_engine) | |
print(raw_sales_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment