'xlsx' file을 'nc' format으로 변환 후 저장하는 과정에서 계속 에러가 뜹니다..
조회수 106회
ValueError: could not convert string to float: 'One'와 같은 에러가 뜨네요.
저장 코드는 test_4d_array.to_netcdf('test (2010-2022).nc') 입니다.
1 답변
-
에러메시지를 재현하는 걸 보여드릴께요.
>>> float("1") 1.0 >>> float("2.33") 2.33 >>> s = 1 >>> float(s) 1.0 >>> s = 3.3 >>> float(s) 3.3 >>> s = "One" >>> float(s) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: could not convert string to float: 'One' >>>
댓글 입력