ValueError:float()的文字无效:

编程入门 行业动态 更新时间:2024-10-28 20:21:15
本文介绍了ValueError:float()的文字无效:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在研究线性回归程序,当我尝试将输入文件数据转换为float(它以字符串形式读入)时,我收到此错误。也许有人可以帮助我?我正在使用Windows XP和IDLE。 (也是控制台屏幕)。

I''m working on a linear regression program and when I try to convert the input file data to a float (it reads in as a string), I get this error. Perhaps someone can help me? I''m using Windows XP, and IDLE. (also the console screen).

展开 | 选择 | Wrap | 行号 推荐答案

我正在研究线性回归程序,当我尝试将输入文件数据转换为float(它以字符串形式读入)时,我收到此错误。也许有人可以帮助我?我正在使用Windows XP和IDLE。 (也是控制台屏幕)。 I''m working on a linear regression program and when I try to convert the input file data to a float (it reads in as a string), I get this error. Perhaps someone can help me? I''m using Windows XP, and IDLE. (also the console screen). 展开 | 选择 | Wrap | 行号

我正在研究线性回归程序,当我尝试将输入文件数据转换为float(它以字符串形式读入)时,我收到此错误。也许有人可以帮助我?我正在使用Windows XP和IDLE。 (也是控制台屏幕)。 I''m working on a linear regression program and when I try to convert the input file data to a float (it reads in as a string), I get this error. Perhaps someone can help me? I''m using Windows XP, and IDLE. (also the console screen). 展开 | 选择 | Wrap | 行号

好的,我现在看到了。但是我不知道如何在我的for循环中使用它。或者我在for循环中使用它?在将文件数据附加到列表之前,难道不能将文件数据转换为浮动吗? ok, I see now. But I''m not sure how to use that with my for loop. Or do I use it in the for loop? Shouldn''t I convert the file data to float before I append it to my list?

更多推荐

ValueError:float()的文字无效:

本文发布于:2023-05-27 02:44:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/275000.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:词库加载错误:Could not find file 'D:\淘小白 高铁采集器win10\Configuration\Dict_Sto

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!