我试图在我的数据集中使用来自scikit learn页面的示例来创建一个管道,但是我得到了错误:ValueError: could not convert string to float: 'Male'from sklearn.compose import ColumnTransformer, make_column_transformerfrom
对于这个挑战,您需要从stdin中读取一行,并检查它是整型、浮点型还是字符串类型。If input is- Integer print‘此输入的类型为Integer。’对stdout浮点型打印'This input is type Float‘对于stdout字符串,打印“This input is type String”对于stdout,则打印“This is print例如,如果我的输入: 45.6输出:浮点数
所以,我的问题是,我如何能够接受输入,就像
我试图将Pandas DataFrame中的值从字符串转换为浮点型,但遇到了错误。该列如下所示:---------------114.250.000462.258.000其中.是数字组分隔符,因此71.638.000应成为浮点型71638000。但是我得到了一个错误:
ValueError: could not c