I'm running python 3.6 on a mac. I have downloaded an mdb file but do not have Microsoft access, I'd like to import each table into python and work with it there.
I have installed mdbtools and run the following from Spyder:
import pandas as pd
import subprocess
import os
os.chdir('<directory where mdb file is>')
def show_tables(path='avroll_19.mdb'):
tables = subprocess.check_output(["mdb-tables", path])
return tables.decode().split()
show_tables()
I get this error: FileNotFoundError: [Errno 2] No such file or directory: 'mdb-tables': 'mdb-tables
'
I have also tried this, but get the same error:
import pandas_access as mdb
for tbl in mdb.list_tables('avroll_19.mdb'):
print(tbl)
I am using Sypder within Anaconda, I am not sure if that is an issue.
The mdb file is located here: https://www1.nyc.gov/assets/finance/downloads/tar/avroll_20.zip
I also attempted to do this using pyodbc, however, it appears that the driver needed for it is not available for mac.
Thank you for your help.