Connect to Any SQL Server in 60 seconds with SQL Alchemy!!

Publicado el: 27 noviembre 2022
en el canal de: Data Science with Josh
44,522
1.3k

This is how to connect to any sql server in less than 60 seconds using the SQL Alchemy python library.

Source code:
Libraries
import pandas as pd
import sqlalchemy
from sqlalchemy import create_engine

Creating SQL Alchemy engine object
engine = create_engine('postgresql://postgres:youtube@localhost:5432/eSports.val')

Initiailizing connection to database
conn = engine.connect()

SQL query as a string to pass into pd.read_sql function
sql = "SELECT * FROM players"

Creating dataframe using sql statement and db connection
df = pd.read_sql_query(sql,conn)


En esta página del sitio puede ver el video en línea Connect to Any SQL Server in 60 seconds with SQL Alchemy!! de Duración hora minuto segunda en buena calidad , que subió el usuario Data Science with Josh 27 noviembre 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 44,522 veces y le gustó 1.3 mil a los espectadores. Disfruta viendo!