JSON To CSV

With Python Pandas it is pretty simple to transform a JSON to CSV.

#!/usr/bin/env python3

import json
import sys
import pandas as pd

def main():
    data = json.load(sys.stdin)
    df = pd.json_normalize(data)
    df.to_csv(sys.stdout, index=False)
    #df.info()

if __name__ == "__main__":
    main()

Reach out to me for professional support!

Contact