Skip to content

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

License

Notifications You must be signed in to change notification settings

jbn/pandas_access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

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

Installation

To read the database, this package (thinly!) wraps MDBTools. Since I assume you're already using Pandas, it should be your only installation requirement.

If you are on OSX, install it via Homebrew:

$ brew install mdbtools

Then, do,

$ pip install pandas_access

Usage

import pandas_access as mdb

# Listing the tables.
for tbl in mdb.list_tables("my.mdb"):
    print(tbl)
    
# Read a small table.
df = pandas_access.read_table("my.mdb", "MyTable")

# Read a huge table.
accumulator = []
for chunk in pandas_access.read_table("my.mdb", "MyTable", chunksize=10000):
    accumulator.append(f(chunk))

If you need more power than this, see: pyodbc.

Testing

I needed this code in a quick pinch -- I had no access to MS Access, and I had a single .mdb file. If someone with Access would like to create a tiny database for unit-testing purposes, I'd be much obliged.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages