I have a list called 'ft_List that looks like...
[['Fall2001', '22.00', '2000', '01', '01', '120.0', '', 'N'],
[CgeCam2002', '20.00', '2000', '09', '04', '0.0', '1', ''],
['Fall2004', '18.50', '2001', '18', '01', '', '', 'Y']........
...how can I convert column 5 to floats? I tried
for i in ft_Rec:
ms = i[5].split(',')
float(ms)
but get
TypeError: float() argument must be a string or number
. I thought it was a string? Is it because some fields are empty (' ')? I'd like to perform some calculations with this column
float(ms)doesn't modify your list: you needi[5] = float(ms)