Note that I had the opportunity to read and analyze Microsoft Access (* .mdb) data Basically, I should have used pandas_access.
pandas_access seems to be a wrapper for mdbtools, so mdbtools is a must.
brianb/mdbtools: MDB Tools - Read Access databases on *nix
Installation of mdbtools (Ubuntu)
$ sudo apt-get install mdbtools
pandas_access installation
$ pip install pandas_access
Implementation example below
Implementation example
import pandas as pd
import pandas_access as mdb
#Get dataframe from mdb
df = mdb.read_table("DB.mdb", "MyTableName")
If you do read_table
for the above, you can getDataframe
, so you can analyze with the usual pandas procedure.
As you can see from the source, read_table
is a wrapper for pandas.read_csv
, so you can use the same arguments as read_csv
after the third argument. See below for the arguments that can be used with read_csv
.
Python Coding Memorandum-Part 3- (Mastering pandas read_csv) --Self-consideration Journey
Recommended Posts