Error: AttributeError: module 'pandas' has no attribute 'Int64Index'

问题描述 投票:0回答:1

我有最新版的pandas

名称:熊猫 版本:2.0.1

我刚刚安装了 fbprophet,现在出现错误:AttributeError: module 'pandas' has no attribute 'Int64Index'

我尝试使用 pip 和 conda 卸载并重新安装 pandas 重新启动 jupyter notebook

python pandas attributeerror
1个回答
0
投票

2.0.1 是对 pandas 2.0 进行重大更新后的一个次要版本,它删除了旧的弃用代码,例如

Int64Index
。从 2.0 更改日志中,Index 现在可以容纳 numpy numeric dtypes

Int64Index、UInt64Index 和 Float64Index 在 pandas 中被弃用 1.4 版,现已删除。相反,应该使用索引 直接,它现在可以接受所有 numpy 数字数据类型,即 int8/ int16/int32/int64/uint8/uint16/uint32/uint64/float32/float64 dtypes

当主要版本中缺少某些内容时,请始终检查变更日志。

© www.soinside.com 2019 - 2024. All rights reserved.