Snippets Collections
import os
import pandas as pd

# Get the list of json files, which are in the folder:   
str_address = r"/media/New Volume/a3d/pdb/json_parser/"
lst_files = [i for i in os.listdir(str_address) if i.endswith(".json")]

# Loop through the json files
for file_ in lst_files: 
    df = pd.read_json(str_address + file_)
    df.to_csv(str_address+ file_+ ".txt", index = False)

Wed Jun 15 2022 09:50:23 GMT+0000 (UTC)

#python #json #converter

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension