My goal is to convert a dictionary to a Pandas dataframe using only json_normalize.
What I have:
d = {'date': '20-NOV-2021', 'sector': {'South': 8, 'Est': 9, 'North': 12, 'Ouest': 9}}
pd.json_normalize(d)
date sector.South sector.Est sector.North sector.Ouest
20-NOV-2021 8 9 12 9
What I'm looking for:
sector value date
South 8 20-NOV-2021
Est 9 20-NOV-2021
North 12 20-NOV-2021
Ouest 9 20-NOV-2021