I am wanting to read data from SQL into Python as a dataframe. I have the first steps completed successfully, but am not sure how to read it into Python as a dataframe.
This is what I am doing:
import pandas as pd
Cap = pyodbc.connect(
'Driver={SQL Server};'
'Server=Test\SQLTest;'
'Database=Cap;'
'Trusted_Connection=yes;'
)
cursor = Cap.cursor()
sql = pd.read_sql_query("SELECT dbo.Catalogs_ID_History$.Location FROM
Table 1", Cap)
Any suggestion is appreciated.