我在我的代码中有这一行,它将我的数据转换为数字...
data["S1Q2I"] = data["S1Q2I"].convert_objects(convert_numeric=True)
事情是这样的,现在新的pandas版本(0.17.0)说这个函数被弃用了。这是错误:
FutureWarning: convert_objects is deprecated.
Use the data-type specific converters pd.to_datetime,
pd.to_timedelta and pd.to_numeric.
data["S3BD5Q2A"] = data["S3BD5Q2A"].convert_objects(convert_numeric=True)
所以,我去了新的文档,我找不到任何关于如何使用新函数来转换我的数据的示例...
它只说了这个:
"DataFrame.convert_objects已被弃用,取而代之的是特定类型的函数pd.to_datetime、pd.to_timestamp和pd.to_numeric (0.17.0中的新函数)(GH11133)。“
任何帮助都会很好!
https://stackoverflow.com/questions/33126477
复制相似问题