I have export.csv file, with data
name,total
candy,10
ice cream,15
potatoe chips,20
when i read the .csv file with this code
with open('files/export.csv','r') as file_csv:
read= list(csv.reader(file_csv))
for row in read:
print(row)
Turns out that the data in the total column is a string data type not a float. I want the output be like this:
"name","total"
"candy",10
"ice cream",15
"potatoe chips",20
So I can sum and take the total column data.

floatbuiltin can convert a string to a float as long as it is in Python's literal float format.