AttributeError: 一个东西 'module' 没有属性 'to_numeric' 在 Pandas
以下代码抛出 AttributeError 到了版本的服务器 Pandas 平等的 0.16.2, 虽然它在我的车上工作很好,而该版本在哪里 0.20.
错误消息如下:
有没有办法避免版本中的此错误 0.16.2? 服务器更新是不可能的。
</module>
df = pandas.read_csv/'filename', header = None, error_bad_lines = False, warn_bad_lines =True,quoting=csv.QUOTE_NONE/
df = df.drop/df[pandas.to_numeric/df[599], errors='coerce'/.isnull//].index/
错误消息如下:
Traceback /most recent call last/:
File "train_model.py", line 11, in <module>
df = df.drop/df[pandas.to_numeric/df[599], errors='coerce'/.isnull//].index/
AttributeError: 'module' object has no attribute 'to_numeric'
有没有办法避免版本中的此错误 0.16.2? 服务器更新是不可能的。
</module>
没有找到相关结果
已邀请:
2 个回复
帅驴
赞同来自:
http://pandas.pydata.org/panda ... .html
与争论
, 错误会自动强制造成。
诸葛浮云
赞同来自:
你必须注意到
pd.to_numeric是胁迫行为的新功能 /胁迫可能/ /GH11133/
所以, pandas 0.16 没有函数
. 但是,您可以使用此功能来实现相同的目标。