![]() # Export to CSV in the same directory with the original file nameĮxport_csv = df.to_csv (file_path + r'.csv', sep=',', encoding='utf-8', index=None, header=True) # Enter the path to the JSON and the filename without appending '.json'ĭic = json.load(open(file_path + '.json', 'r', encoding='utf-8', errors='ignore'))ĭic_flattened = (flatten(d, '.') for d in dic) ![]() Extract certain nested data in the JSON file. ![]() I'm converting several JSON files into a CSV using the following code below, it works as intended, but it converts all of the data in the JSON file.
0 Comments
Leave a Reply. |