[Linux] [Python] [Pandas] Load Microsoft Access database (* .mdb) with Pandas

Note that I had the opportunity to read and analyze Microsoft Access (* .mdb) data Basically, I should have used pandas_access.

jbn/pandas_access: A tiny, subprocess-based tool for reading a MS Access database (.rdb) as a Pandas DataFrame.

Execution procedure

Install mdbtools

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

Use of pandas_acccess

jbn/pandas_access: A tiny, subprocess-based tool for reading a MS Access database (.rdb) as a Pandas DataFrame.

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.

Supplement

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

[Linux] [Python] [Pandas] Load Microsoft Access database (* .mdb) with Pandas
Yum command to access MySQL with Python 3 on Linux
Get data from database via ODBC with Python (Access)
ODBC access to SQL Server from Linux with Python
Read csv with python pandas
[Python] Change dtype with pandas
Access Google Drive with Python
[Python] Join two tables with pandas
Load gif images with Python + OpenCV
Excel aggregation with Python pandas Part 1
[Python] Format when to_csv with pandas
Building a Python3 environment with Amazon Linux2
Load csv with duplicate columns in pandas
[C] [python] Read with AquesTalk on Linux
Excel aggregation with Python pandas Part 2 Variadic
[Easy Python] Reading Excel files with pandas
Load AWS-RDS / PostgreSQL tables with AWS-Lambda + Python
Load csv with pandas and play with Index
[Continued] Try PLC register access with Python
Access Cyclone V's Lightweight HPS-to-FPGA Bridge with Python
Load the network modeled with Rhinoceros in Python ③
Automatic operation of Chrome with Python + Selenium + pandas
Read Python csv data with Pandas ⇒ Graph with Matplotlib
[Python] How to read excel file with pandas
Analyze Apache access logs with Pandas and Matplotlib
Load the network modeled with Rhinoceros in Python ②
Load the network modeled with Rhinoceros in Python ①