I have a df where one of my columns carries a string representation of a np array. Values have variable amounts of whitespace in between them and some have scientific notation and some don't. An example looks like this:
'[1.754785e-03 1.017525e-04 6.074961e-04 1.533449e-03 3.90 9.817408e-01 8.334255e-03 1.835601e-03 6.365406e-04]'
I want the following result:
[1.754785, 1.017525, 6.074961, 1.533449, 3.9, 9.817408e, 8.334255, 1.835601, 6.365406]
You will notice that the scientific notation has been replaced with 6 digit precision, all variable whitespace is used to split values regardless of how many spaces separate, and the values are now comma separated and stored in a list or floats.