Skip to content

Instantly share code, notes, and snippets.

Created October 18, 2018 10:03
What would you like to do?
flatten json using flatten_json
#!/usr/bin/env python3
import flatten_json
import sys
import json
if __name__ == '__main__':
if len(sys.argv) < 3:
print(f'usage: {sys.argv[0]} in.csv out.csv')
f_out = open(sys.argv[2], 'w')
for line in open(sys.argv[1]):
j2 = flatten_json.flatten_json(json.loads(line))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment