Skip to content

Instantly share code, notes, and snippets.

@zushane
Created June 30, 2020 20:49
Show Gist options
  • Save zushane/737defb3a29482aec3a6d4fd7a71f25e to your computer and use it in GitHub Desktop.
Save zushane/737defb3a29482aec3a6d4fd7a71f25e to your computer and use it in GitHub Desktop.
A simple python script to convert json to csv, using Pandas.
import os,pandas
for file in os.listdir('./'):
if file.endswith('.json'):
print'Processing: ', os.path.join('./', file)
newfilename = str(file) + ".csv"
pandas.read_json(file).to_csv(newfilename, encoding = 'utf-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment