skip to Main Content

Convert json directly into dictionary of pandas dataframes

I have json files which look like a dictionary of a list of similar dictionaries: {"People":[{"FirstName":"Max","Surname":"Smith"},{"FirstName":"Jane","Surname":"Smart"}], "Animals":[{"Breed":"Cat","Name":"WhiteSocks"},{"Breed":"Dog","Name":"Zeus"}]} I'm using the following code to convert this into a dictionary of pandas dataframes: import pandas as pd import json # Read the…

VIEW QUESTION

Partially flatten nested JSON and pivot longer

I have many JSON files with the following structure: { "requestId": "test", "executionDate": "2023-05-10", "executionTime": "12:02:22", "request": { "fields": [{ "geometry": { "type": "Point", "coordinates": [-90, 41] }, "colour": "blue", "bean": "blaCk", "birthday": "2021-01-01", "arst": "111", "arstg": "rst", "fct": {…

VIEW QUESTION
Back To Top
Search