I have a dataframe df that loads data from a database. Most of the columns are json strings while some are even list of jsons. For example:
df
id
The quickest seems to be:
json_struct = json.loads(df.to_json(orient="records")) df_flat = pd.io.json.json_normalize(json_struct) #use pd.io.json