简体   繁体   English

AttributeError: 模块“pandas”没有属性“core”

[英]AttributeError: module 'pandas' has no attribute 'core'

I have installed the tensorflow library on Windows, then my Pandas library stopped working, and after pandas importing appears the same issue as by importing the 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'

Tried to re-installed pandas and TensorFlow, but nothing helped.尝试重新安装熊猫和 TensorFlow,但没有任何帮助。

I have just encountered this problem and solved it.我刚刚遇到这个问题并解决了它。 This is my solution way: use conda upgrade --all and then restart you notebook.这是我的解决方法:使用conda upgrade --all然后重新启动笔记本。

使用旧版本的熊猫: pip install pandas==0.22

I had pandas version 0.25 in Ubuntu 19.04, but for work this library I returned pandas from 0.25 version to 0.24.我在 Ubuntu 19.04 中有 Pandas 0.25 版本,但是为了工作这个库,我将 Pandas 从 0.25 版本返回到 0.24。

pip install pandas==0.24

(python 3.6) (蟒蛇3.6)

1) import it again and then 1)再次导入,然后

2) update your Bash profile , and you will not see this error after that and then 2) 更新您的 Bash 配置文件,之后您将不会看到此错误,然后

3) restart your notebook , hope it helps 3) 重启你的笔记本,希望对你有帮助

I tried both upgrading conda and restarting jupyter notebook/ uninstall pandas and reinstall pandas.我尝试升级 conda 并重新启动 jupyter notebook/卸载熊猫并重新安装熊猫。 It worked它起作用了

I faced similar error when importing pandas.core.config .我在导入pandas.core.config时遇到了类似的错误。 It returned它回来了

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

The error disappears when I uninstall current version (1.1.2) and re-install pandas in older version (0.22).当我卸载当前版本 (1.1.2) 并在旧版本 (0.22) 中重新安装熊猫时,错误消失。 It seems like the error had happened since v0.25 according to this issue thread .根据此问题线程,该错误似乎自 v0.25 以来发生。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 熊猫引发:AttributeError:模块&#39;pandas.core&#39;没有属性&#39;format&#39; - Pandas raising: AttributeError: module 'pandas.core' has no attribute 'format' AttributeError:模块'numpy'没有属性'core' - AttributeError: module 'numpy' has no attribute 'core' Python:AttributeError:模块'core'没有属性'children' - Python: AttributeError: module 'core' has no attribute 'children' AttributeError:模块“ fut”没有属性“ Core” - AttributeError: module 'fut' has no attribute 'Core' 我无法在pycharm中导入熊猫,但出现错误:AttributeError:模块&#39;pandas&#39;没有属性&#39;core&#39; - I can't import pandas in pycharm there is a error: AttributeError: module 'pandas' has no attribute 'core' 导入 Pandas 出现错误 AttributeError:模块 &#39;pandas&#39; 在 iPython Notebook 中没有属性 &#39;core&#39; - Importing Pandas gives error AttributeError: module 'pandas' has no attribute 'core' in iPython Notebook AttributeError: 模块“pandas”没有属性“rolling” - AttributeError: module 'pandas' has no attribute 'rolling' AttributeError: 模块“pandas”没有属性“to_csv” - AttributeError: module 'pandas' has no attribute 'to_csv' AttributeError: 模块 &#39;pandas&#39; 没有属性 &#39;__version__&#39; - AttributeError: module 'pandas' has no attribute '__version__' AttributeError:模块“pandas”没有属性“ewmstd” - AttributeError: module 'pandas' has no attribute 'ewmstd'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM