Importing Pandas gives error AttributeError: module #39;pandas#39; has no attribute #39;core#39; in iPython Notebook(导入 Pandas 会出现错误 AttributeError: module pandas has no attribute core in iPython Notebook)
问题描述
我正在通过 Anaconda Navigator 应用程序(版本 1.1.0)运行 iPython 笔记本.当我想导入熊猫时,它给了我一个奇怪的错误.我以为 Anaconda 应用包含 pandas 包?
I am running a iPython notebook via the Anaconda Navigator app (version 1.1.0). When I want to import pandas it gives me a strange error. I thought the Anaconda app included the pandas package?
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-af55e7023913> in <module>()
----> 1 import pandas as pd
/Users/bertcarremans/anaconda/lib/python3.5/site-packages/pandas/__init__.py in <module>()
37 import pandas.core.config_init
38
---> 39 from pandas.core.api import *
40 from pandas.sparse.api import *
41 from pandas.stats.api import *
/Users/bertcarremans/anaconda/lib/python3.5/site-packages/pandas/core/api.py in <module>()
8 from pandas.core.common import isnull, notnull
9 from pandas.core.categorical import Categorical
---> 10 from pandas.core.groupby import Grouper
11 from pandas.core.format import set_eng_float_format
12 from pandas.core.index import (Index, CategoricalIndex, Int64Index,
/Users/bertcarremans/anaconda/lib/python3.5/site-packages/pandas/core/groupby.py in <module>()
16 DataError, SpecificationError)
17 from pandas.core.categorical import Categorical
---> 18 from pandas.core.frame import DataFrame
19 from pandas.core.generic import NDFrame
20 from pandas.core.index import (Index, MultiIndex, CategoricalIndex,
/Users/bertcarremans/anaconda/lib/python3.5/site-packages/pandas/core/frame.py in <module>()
37 create_block_manager_from_arrays,
38 create_block_manager_from_blocks)
---> 39 from pandas.core.series import Series
40 from pandas.core.categorical import Categorical
41 import pandas.computation.expressions as expressions
/Users/bertcarremans/anaconda/lib/python3.5/site-packages/pandas/core/series.py in <module>()
33 from pandas.core.internals import SingleBlockManager
34 from pandas.core.categorical import Categorical, CategoricalAccessor
---> 35 import pandas.core.strings as strings
36 from pandas.tseries.common import (maybe_to_datetimelike,
37 CombinedDatetimelikeProperties)
AttributeError: module 'pandas' has no attribute 'core'
推荐答案
显然我在尝试导入 pandas 第一次时遇到的错误是 ValueError: unknown locale: UTF-8
Apparently the error I got when trying to import pandas for the first time was ValueError: unknown locale: UTF-8
之后尝试再次导入,出现了另一个错误,如我上面的问题所述.
Trying to import again afterwards, gave another error as described in my question above.
我在 IPython Notebook 语言环境错误
更新我的 bash 配置文件后,错误 AttributeError: module 'pandas' has no attribute 'core'
不再出现.
After updating my bash profile, the error AttributeError: module 'pandas' has no attribute 'core'
did not appear anymore.
这篇关于导入 Pandas 会出现错误 AttributeError: module 'pandas' has no attribute 'core' in iPython Notebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:导入 Pandas 会出现错误 AttributeError: module 'pan


- python check_output 失败,退出状态为 1,但 Popen 适用于相同的命令 2022-01-01
- padding='same' 转换为 PyTorch padding=# 2022-01-01
- pytorch 中的自适应池是如何工作的? 2022-07-12
- 分析异常:路径不存在:dbfs:/databricks/python/lib/python3.7/site-packages/sampleFolder/data; 2022-01-01
- 如何将一个类的函数分成多个文件? 2022-01-01
- 沿轴计算直方图 2022-01-01
- 如何在 python3 中将 OrderedDict 转换为常规字典 2022-01-01
- 如何在 Python 的元组列表中对每个元组中的第一个值求和? 2022-01-01
- 使用Heroku上托管的Selenium登录Instagram时,找不到元素';用户名'; 2022-01-01
- python-m http.server 443--使用SSL? 2022-01-01