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 pymssql | |
import pandas as pd | |
## Hey Look, college data | |
stmt = "SELECT * FROM AlumniMirror..someTable" | |
## instance a python db connection object- same form as psycopg2/python-mysql drivers also | |
with pymssql.connect(server="<server address>", user="<user>",password="<password>", port=63642) as conn: # You can lookup the port number inside SQL server. | |
# Excute Query here | |
df = pd.read_sql(stmt,conn) |