Visit to get more -- https://www.youtube.com/@studytech-aksadur3344?sub_confirmation=1
# to install pyodbc
pip install pyodbc
conn = pyodbc.connect(driver='{SQL Server Native Client 11.0}',
server='RUBEL-PC',
database='HMS',
Trusted_Connection='yes')
conn = pyodbc.connect(driver='{SQL Server Native Client 11.0}',
server='RUBEL-PC',
database='HMS',
UID='dbuser',
PWD='abc123')
query = "select * from Patient"
df = pd.read_sql(query, conn)
df