I have a column in my dataframe that contains string rows such as :
'(0.0,0.8638888888888889,3.7091666666666665,12.023333333333333,306.84694444444443)'
This output (produced by another program) corresponds to the min, 25th, median, 75th and max for a given variable.
I would like to extract that information, and put them in separate numeric columns, such as
min p25 p50
0.0 0.864 3.70
The data I have is really large. How can I do that in Pandas?
Many thanks!
df[['min','p25','p50']] = df['col'].apply(lambda x: pd.Series(x[0],x[1],x[2]))? Also what you've shown is a tuple with integers but your title says strings so which is it? Can you post raw data and code