I read a pandas dataframe df
from .csv
file.
Each cell of the dataframe contains a string like the following
for i in df.index:
for j in df.columns:
df[i][j]
'[0.109, 0.1455, 0.0, 1.80e-48, 42.070, -14.582]'
I would like to have a list
with the values as np.float
. I tried
df[i][j].split()
'[0.109,',
'0.145,',
'0.0,',
'1.80e-48,',
'42.070,',
'-14.582]']