I am trying to convert text from a csv file to a floating point number. But i keep getting the error: ValueError: could not convert string to float: year. I am getting the same error when trying to convert to int. The number that is imported is 2018.0
import csv
with open('test_csv.csv', 'rb') as data_file:
data = csv.reader(data_file, delimiter=',')
for i in data:
year = float(i[0])