I got pyodbc to work with my SQL Server instance, then, with some help from this thread , I got sql return to load the dataframe.
I already made a pyodbc connection and then made a call.
import pyodbc import pandas.io.sql as psql cnxn = pyodbc.connect(your_connection_info) cursor = cnxn.cursor() sql = ("""SELECT * FROM Source""") df = psql.frame_query(sql, cnxn) cnxn.close()
df should return your framework. The hardest part for me was getting pyodbc up and running - I had to use freetds , and it took a lot of trial and error to work.
mikebmassey Nov 26 '12 at 18:23 2012-11-26 18:23
source share