How to convert string representation of dictionary in Pandas DataFrame to a new columns?

You can try with ast

import ast
df['the_column']=df['the_column'].apply(ast.literal_eval)

Leave a Comment