ValueError: could not convert string to float: '[0.0267469, 0.0272395, 0.0268747]'
up vote
0
down vote
favorite
I try a code like this: import pandas as pd import numpy as np test_data='train.csv' csv_reader = pd.read_csv(test_data) x_list = csv_reader[['spectra']] x_list = np.array(x_list) x = [float(o) for o in x_list[0]] y_list = csv_reader[['molecule']] and then I get this: Traceback (most recent call last): File "D:/Users/11825/source/repos/deep/shiyishi.py", line 16, in <module> x = [float(o) for o in x_list[0]] File "D:/Users/11825/source/repos/deep/shiyishi.py", line 16, in <listcomp> x = [float(o) for o in x_list[0]] ValueError: could not convert string to float: '[0.0267469, 0.0272395, 0.0268747, 0.0267555]' this is the data's picture: enter image description here how i can save it?
...