python - 属性错误 : module 'pandas' has no attribute 'core'

标签 python pandas tensorflow

我在 Windows 上安装了 tensorflow 库,然后我的 Pandas 库停止工作,导入 pandas 后出现与导入 tensorflow 相同的问题。

import pandas as pd

AttributeError                            Traceback (most recent call last)
<ipython-input-24-af55e7023913> in <module>()
----> 1 import pandas as pd

C:\Users\kozyr\Anaconda3\lib\site-packages\pandas\__init__.py in <module>()
     40 import pandas.core.config_init
     41 
---> 42 from pandas.core.api import *
     43 from pandas.core.sparse.api import *
     44 from pandas.stats.api import *

C:\Users\kozyr\Anaconda3\lib\site-packages\pandas\core\api.py in <module>()
      8 from pandas.core.dtypes.missing import isnull, notnull
      9 from pandas.core.categorical import Categorical
---> 10 from pandas.core.groupby import Grouper
     11 from pandas.io.formats.format import set_eng_float_format
     12 from pandas.core.index import (Index, CategoricalIndex, Int64Index,

C:\Users\kozyr\Anaconda3\lib\site-packages\pandas\core\groupby.py in <module>()
     47                                CategoricalIndex, _ensure_index)
     48 from pandas.core.categorical import Categorical
---> 49 from pandas.core.frame import DataFrame
     50 from pandas.core.generic import NDFrame, _shared_docs
     51 from pandas.core.internals import BlockManager, make_block

C:\Users\kozyr\Anaconda3\lib\site-packages\pandas\core\frame.py in <module>()
     65                                 _maybe_box_datetimelike,
     66                                 _dict_compat)
---> 67 from pandas.core.generic import NDFrame, _shared_docs
     68 from pandas.core.index import Index, MultiIndex, _ensure_index
     69 from pandas.core.indexing import (maybe_droplevels, convert_to_index_sliceable,

C:\Users\kozyr\Anaconda3\lib\site-packages\pandas\core\generic.py in <module>()
     39 from pandas.core.index import (Index, MultiIndex, _ensure_index,
     40                                InvalidIndexError)
---> 41 import pandas.core.indexing as indexing
     42 from pandas.core.indexes.datetimes import DatetimeIndex
     43 from pandas.core.indexes.period import PeriodIndex, Period

AttributeError: module 'pandas' has no attribute 'core'

尝试重新安装 pandas 和 TensorFlow,但无济于事。

最佳答案

我刚遇到这个问题,解决了。这是我的解决方法: 使用 conda upgrade --all 然后重启你的笔记本。

关于python - 属性错误 : module 'pandas' has no attribute 'core' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45357826/

相关文章:

python - Conda - 离线安装/更新

python - Pandas:检查另一列中是否存在子字符串,然后创建一个具有特定值的新列

python - 用列拆分 Pandas 数据框

python - 根据 Pandas 中另一个单元格的内容在一个单元格中写入特定数据

linux - Pycharm tensorflow ImportError 但适用于终端

python - 导入 Tensorflow 时出错

c++ - 将 Keras 模型转换为 TensorFlow protobuf

python - 从 python 中的字符串中删除 LaTeX 字符

python - NLTK值错误: too many values to unpack (expected 2)

当列表项存在时,Python list max 函数