无法导入 Pandas 分析

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/49314314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 05:20:14  来源:igfitidea点击:

Unable to import Pandas Profiling

python-3.xpandasjupyter-notebookpandas-profiling

提问by NEX

I am unable to import pandas profiling in jupyter notebook. Could someone please tell me whats wrong. enter image description here

我无法在 jupyter notebook 中导入 pandas 分析。有人可以告诉我出了什么问题。 enter image description here

采纳答案by NEX

Thanks a lot to all who tried to help me out. This worked.

非常感谢所有试图帮助我的人。这奏效了。

import sys
!{sys.executable} -m pip install pandas-profiling

回答by Niranjan

conda install -c conda-forge pandas-profilingTry this command to install If it doesn't work then try pip install pandas-profiling

conda install -c conda-forge pandas-profiling试试这个命令安装如果它不起作用然后尝试 pip install pandas-profiling

回答by Thomas G.

If you run jupyter notebook so:

如果您运行 jupyter notebook,则:

python -m jupyter notebook

You can install the packages so:

您可以这样安装软件包:

python -m pip install pandas-profiling

I had a lot of trouble because the 'python' of the jupyter notebook when I ran only jupyter notebookwas another installation of python than the one on my bash. If you run the module 'jupyter notebook' and the module 'pip' with the commands 'python -m' before, you ensure that you are using the same installation.

我遇到了很多麻烦,因为当我只运行 jupyter 笔记本时,'python'jupyter notebook是另一种 python 安装,而不是我的 bash 上的安装。如果您之前使用命令“python -m”运行模块“jupyter notebook”和模块“pip”,则确保使用相同的安装。

回答by wordsforthewise

Sure, you can install via pip but I like to use conda for as many installs as possible to help keep the environment easier to work with.

当然,您可以通过 pip 安装,但我喜欢使用 conda 进行尽可能多的安装,以帮助保持环境更易于使用。

The conda page shows multiple versions for pandas-profiling: https://anaconda.org/conda-forge/pandas-profiling

conda 页面显示了 pandas-profiling 的多个版本:https: //anaconda.org/conda-forge/pandas-profiling

You need to specify the latest one when installing:

安装时需要指定最新的:

conda install -c conda-forge pandas-profiling=2.6.0

Replace 2.6.0 with the latest version.

将 2.6.0 替换为最新版本。

回答by Ankit Kumar Rajpoot

For Mac

对于 Mac

pip install pandas-profiling

And For Ubuntu

对于 Ubuntu

!pip install pandas-profiling

回答by AshishSingh007

There are multiple option to do so.

有多种选择可以这样做。

  1. Go to CMD & then type python -m pip install pandas-profiling

  2. Go to CMD & conda install -c conda-forge pandas-profiling=2.6.0

  3. import sys class in Jupyter note book & enter below line & enter !{sys.executable} -m pip install pandas-profiling Above is really cool to use.

  4. Little manual but works most of the time. Download pandas-profile lib from https://pypi.org/project/pandas-profiling/#modal-closeextract it and paste C:\anaconda\Lib\site-packages Restart your Anaconda & happy to use.

  1. 转到 CMD 然后输入 python -m pip install pandas-profiling

  2. 转到 CMD & conda install -c conda-forge pandas-profiling=2.6.0

  3. 在 Jupyter Notebook 中导入 sys 类并在下面输入并输入 !{sys.executable} -m pip install pandas-profiling 上面使用起来真的很酷。

  4. 手册很少,但大部分时间都有效。从https://pypi.org/project/pandas-profiling/#modal-close下载 pandas-profile lib 解压并粘贴 C:\anaconda\Lib\site-packages 重新启动你的 Anaconda 并很高兴使用。

I hope this will help.

我希望这将有所帮助。