Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Explodes df column containing list of dict to dataframe with key col
- df_in = df.set_index('key_col')['list_of_dict'].explode()
- df_out = pd.DataFrame(df_in.tolist(), index=df_in.index).reset_index()
Advertisement
Add Comment
Please, Sign In to add comment