Connect to MSSQL

import pandas as pd
import pyodbc

conn = pyodbc.connect('DRIVER={SQL Server};SERVER=<<Instance Name>>;DATABASE=<<Database Name>>;UID=<<UserName>>;PWD=<<Password>>;')

df= pd.io.sql.read_sql('select 1 as col1, 2 as col2', conn)

Result