Skip to content

Instantly share code, notes, and snippets.

@hsinhoyeh
Created June 27, 2018 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hsinhoyeh/c6ce673bc86e1dceb8b57493b5b38a36 to your computer and use it in GitHub Desktop.
Save hsinhoyeh/c6ce673bc86e1dceb8b57493b5b38a36 to your computer and use it in GitHub Desktop.
import parquet
// pip3 install parquet
import json
import glob
def parquet2json(filename):
print(filename)
with open(filename, "rb") as fo:
output = "{}.json".format(filename)
rows = []
for row in parquet.reader(fo):
rows.append(row)
with open(output, 'w') as outfile:
json.dump(rows, outfile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment