I have a column in my pandas dataframe that contains array of numbers:
index | col
0 | [106.43477116337492, 6.762679391732501, 0.0, 9...
1 | [106.43477116337492, 6.58742122158056, 0.0, 9....
2 | [106.22211427793361, 7.303693743071101, 0.0, 9...
3 | [106.43477116337492, 7.955196940809838, 0.0, 9...
4 | [106.43477116337492, 6.400733170766536, 0.0, 9...
One value:
array([106.43477116, 6.76267939, 0. , 9.26076567,
10.78086689, 106.63684122, 5.98865461, 0. ,
8.16789259, 9.94066589, 2.03606668, 0. ,
0. ])
I need to expand the values in the array to separate columns so I will have:
col1 | col2 | col3 ...
106.434... | 6.7526.... | 0.0 ...
106.434... | 6.5874.... | 0.0 ...
How to do this? I already spent quite some time researching on this but only thing I found is explode() which is not what I want.
explode?explodeexplodes the values into rows instead of columns