Skip to content

Instantly share code, notes, and snippets.

@gokceneraslan
Created December 31, 2019 10:32
Show Gist options
  • Save gokceneraslan/60cb4eb97300b40e24bd3d89101ecc21 to your computer and use it in GitHub Desktop.
Save gokceneraslan/60cb4eb97300b40e24bd3d89101ecc21 to your computer and use it in GitHub Desktop.
OpenTargets - Generate flat dataframe from association_data.json file
import gzip, json
from pandas.io.json import json_normalize
filename = '19.11_association_data.json.gz'
jlist = json_normalize([json.loads(x) for x in gzip.open(filename, 'rt').read().splitlines()])
jlist.to_pickle('19.11_association_data.pkl')
@gokceneraslan
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment