Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Ast & Pandas solution in 3rd party category for The Flat Dictionary by paf
import pandas as pd
import ast
def flatten(dictionary):
dt = ast.literal_eval((str(dictionary)).replace('{}', '""'))
[flat_dict] = pd.json_normalize(dt, sep='/').to_dict(orient='records')
return flat_dict
March 3, 2023
Comments: