I have csv file , which have one column and inside this column have string , string contains many values , i want to convert this string in muultiple columns
here is example data:
df = pd.DataFrame({'column1':[{'A':2,'B':3,'c':2}]})
print(df)
column1
0 {'A': 2, 'B': 3, 'c': 2}
1 {'A': 3, 'B': 5, 'c': 10}
i want output:
df = pd.DataFrame({'A':[2],'B':[3],'c':[2]})
i got this solution and it's work but this solution have * expression i am not sure this is about what. except this have any other effiecient solution ?
pd.DataFrame([*df['column1'].apply(eval)])