Joe Moss
Joe Moss

Reputation: 65

Read access table into dataframe

I'm trying to read an Access table into a pandas dataframe and am a relative newbie. The name of the file/table are:

  1. Name of MS Access file: test.mdb
  2. table Name: MA MEMBERSHIP COMBINED CAP REPORT

I've trying the pandas_access package w/o luck. Code I tried is below:

import pandas_access as mdb
import pandas as pd
df=pd.DataFrame()
df = mdb.read_table("test.mdb", "MA MEMBERSHIP COMBINED CAP REPORT 2018")

Table I'm reading is about 700 MB. Would appreciate any suggestions?

-Joe

Upvotes: 3

Views: 6875

Answers (1)

Gustav
Gustav

Reputation: 55816

As a start, use your actual database, and bracket the table name:

df = mdb.read_table("BlueCap MA txt files 2018.mdb", "[MA MEMBERSHIP COMBINED CAP REPORT 2018]")

Upvotes: 1

Related Questions