Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import jaydebeapi
- import pandas as pd
- def cursor_to_df(cursor):
- df = pd.DataFrame(cursor.fetchall())
- df.columns = [d[0] for d in cursor.description]
- return df
- fmsHostname = 'fmprod13.med.harvard.edu'
- fmFilename = 'HITS_Reagent_Tracker_2_0'
- fmUser = ''
- fmPassword = ''
- conn = jaydebeapi.connect(
- 'com.filemaker.jdbc.Driver',
- ['jdbc:filemaker://' + fmsHostname + '/' + fmFilename, fmUser, fmPassword],
- 'fmjdbc.jar'
- )
- cursor = conn.cursor()
- cursor.execute('select * from entity')
- entities = cursor_to_df(cursor)
- print entities.head()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement