I found a great function from Thomas C. Mann at https://github.com/thomascmann/flatten-data In his words
Python script for flattening nested data into a list of dicts, designed for importing into a pandas DataFrame. The script takes a nested data object and returns a list of dicts. Dicts within the object are flattened, and lists within the object are converted into separate dicts within the returned outer list, copying higher-level elements
On Jupyter Notebooks use
!pip install git+https://github.com/dacog/flatten_data
On normal pip use
pip install git+https://github.com/dacog/flatten_data
from flatten_data import flatten_data as fd
fd.flatten_data(data, simple=0)
simple can have a value of 0 or 1. Check the examples to learn more.