Tutorial by Examples

import pandas.io.sql import pyodbc import pandas as pd Specify the parameters # Parameters server = 'server_name' db = 'database_name' UID = 'user_id' Create the connection # Create the connection conn = pyodbc.connect('DRIVER={SQL Server};SERVER=' + server + ';DATABASE=' + db + '; UID...
import os, time import pyodbc import pandas.io.sql as pdsql def todf(dsn='yourdsn', uid=None, pwd=None, query=None, params=None): ''' if `query` is not an actual query but rather a path to a text file containing a query, read it in instead ''' if query.endswith('.sql') and o...

Page 1 of 1