I have found that despite only supporting sqlite , the pandas.io.sql.read_sql method work well to create a dataframe by query a Microsoft Access database.
driver_string="DRIVER={Microsoft Access Driver (*.mdb)}"
file_string = "DBQ="+"test.mdb"
connection_string = ";".join([driver_string, file_string])
cnxn = pyodbc.connect(connection_string)
cursor = cnxn.cursor()
df = pd.read_sql("SELECT * FROM testTable", con=cnxn, index_col = ["indexCol"])
I am more interested in reading data and will not likely write back to the database. I've also tested this with more complex queries that include joins and it seems to work well.
Can anyone tell me if there is a danger here? This seems a lot simpler than using SQLAlchemy (which also doesn't support Access).
I would appreciate any insight anybody has.