Python Forum
Data Linkage in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data Linkage in Python
#5
You can use the python csv package to read in the data
I would load each into an sqlite3 database if you are using python 3.5
it will already be installed, so simply import sqlite3.

create four tables, each with a name corresponding to your table names,
and containing all of the fields that you show below.

Build indexes for each on the patient identifier, and maybe for the two tables that contain gpid
an index on that as well

Now you can access data from each table with simple sql query on PatientId

I'm rusty on SQL, but you can write a query to pull from all four tables at once.

Someone else here will be able to help with that.

I see Yoriz has replied while I was typing. Use his suggestion and go for pandas.
Reply


Messages In This Thread
Data Linkage in Python - by PietonNewbie - Nov-08-2016, 12:07 PM
RE: Data Linkage in Python - by Larz60+ - Nov-08-2016, 12:34 PM
RE: Data Linkage in Python - by PietonNewbie - Nov-08-2016, 12:53 PM
RE: Data Linkage in Python - by Yoriz - Nov-08-2016, 01:22 PM
RE: Data Linkage in Python - by Larz60+ - Nov-08-2016, 01:27 PM
RE: Data Linkage in Python - by PietonNewbie - Nov-09-2016, 01:47 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020