我已经放下代码一段时间了,现在它没有通过很多测试。但是代码是这样写的: x = a - b - c 至: x = a.astype(float) - b.astype(float) - c.astype(float) 这是行不通的,因为int没有astype错误现在看起来像这样: 文件"/home/engine.py",第165行,Foo lower_arrayt.astype
range(len(df[col])): df[col] = df[col].astypedf[col] = df[col].astype(int) #round returns a float, this turns it back to int after rounding 在for循环中,:dfcol.replace(',',''
text = str(text.encode("utf-8")) AttributeError:'float‘对象没有属性'encode’
我试图使用df'Translated_message'=df'Translated_message'.values.astype('string')将数据转换为字符串,但这不起作用。