python 中pandas模块报错_python – ImportError:没有名为’pandas.indexes’的模块

导入pandas并没有抛出错误,而是尝试读取拾取的pandas数据帧:

import numpy as np

import pandas as pd

import matplotlib

import seaborn as sns

sns.set(style="white")

control_data = pd.read_pickle('null_report.pickle')

test_data = pd.read_pickle('test_report.pickle')

回溯是165行,有三个并发异常(无论这意味着什么). read_pickle与pandas版本17.1不兼容我正在运行吗?如何取消我的数据帧的使用?

以下是回溯的副本:

ImportError Traceback (most recent call last)

C:\Users\test\Anaconda3\lib\site-packages\pandas\io\pickle.py in try_read(path, encoding)

45 with open(path, 'rb') as fh:

---> 46 return pkl.load(fh)

47 except (Exception) as e:

ImportError: No module named 'pandas.indexes'

During handling of the above exception, another exception occurred:

ImportError Traceback (most recent call last)

C:\Users\test\Anaconda3\lib\site-packages\pandas\io\pickle.py in try_read(path, encoding)

51 with open(path, 'rb') as fh:

---> 52 return pc.load(fh, encoding=encoding, compat=False)

53

C:\Users\test\Anaconda3\lib\site-packages\pandas\compat\pickle_compat.py in load(fh, encoding, compat, is_verbose)

115

--> 116 return up.load()

117 except:

C:\Users\test\Anaconda3\lib\pickle.py in load(self)

1038 assert isinstance(key, bytes_types)

-> 1039 dispatch[key[0]](self)

1040 except _Stop as stopinst:

C:\Users\test\Anaconda3\lib\pickle.py

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值