20231229 TIL
import pandas as pd
# This is the object structure you've provided
data = [
{'level_0': {'point': 'A'},
'level_1': {'president': None},
'level_2': {'press': {'name': False,
'year': None,
'type': None},
'journalist': {'name': False,
'year': None,
'type': None}
},
'link': 'https://www.abc.com'}
# ... you can add more dictionary items here
]
# Flatten the nested structure and create a DataFrame
df = pd.json_normalize(data)