I am working with a CSV file that contains 2 columns, the first a date column with format yyyymmdd, the second a string value that is in the format of a float, 0.0 for example.<
float() doesn't modify a variable in-place, it returns the new typed value. Assign it back:
float()
rain_amount = float(rain_amount)