【Python学习】-报错 AttributeError: module ‘pandas‘ has no attribute ‘Factor‘

【Python学习】-报错 AttributeError: module ‘pandas‘ has no attribute ‘Factor‘,第1张


将原代码这一行更改为:
df[‘species’] = pd.Categorical.from_codes(iris.target, iris.target_names)

以下是搬运的解释:

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/798269.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-06
下一篇2022-05-06

发表评论

登录后才能评论

评论列表(0条)

    保存