Converting nested JSON structures to Pandas DataFrames

Derek Mortensen
May 10, 2020 · 4 min read

The Problem

APIs and document databases sometimes return nested JSON objects and you’re trying to promote some of those nested keys into column headers but loading the data into pandas gives you something like this:

df = pd.DataFrame.from_records(results["issues"], columns=["key", "fields"])