Can't convert string number value to float

后端 未结 3 524
旧时难觅i
旧时难觅i 2021-01-21 08:19

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.<

3条回答
  •  终归单人心
    2021-01-21 08:26

    You are not storing the updated float type. You have to assign it back.

    do this:

    rain_amount=float(rain_amount)
    

提交回复
热议问题