When I tried to read the data from a csv file. I want to set the 'Data' column's datatype as float, so my code is like:
data = pd.read_csv('data.csv', index_col=0,
parse_dates=[0],
skiprows=[0], names=['Data'],
dtype={'Data':np.float32})
But the result I got is still list of strings. Is there any reason and any solution for it?
[5]: data.values
[5]: array([['1188.0'],
['1377.0'],
['1279.0'],
['1461.0'],
['1146.0'],
['1287.0'],
['1259.0']], dtype=object)