I have a data that is converted to a list. How do I convert this to a DataFrame such that each row in that list becomes a column in the DataFrame?
[{'date': '2019-01-01',
'stats': [{'metrics': {'comp_1': 149,
'comp_2': 276}}]},
{'date': '2019-01-02',
'stats': [{'metrics': {'comp_1': 232,
'comp_2': 842}}]}]
I tried to do pd.DataFrame(c) where c was the variable holding the list but I saw all components of each date was stored in a single row
Expected output:
date, comp_1, comp_2
2019-01-01,149,276
2019-01-02,232,842