Created
June 27, 2018 02:10
-
-
Save hsinhoyeh/c6ce673bc86e1dceb8b57493b5b38a36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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