簡體   English   中英

Juypter 筆記本 pandas_profiling:無法從“pandas_profiling.report”導入名稱“to_html”

[英]Juypter notebook pandas_profiling: cannot import name 'to_html' from 'pandas_profiling.report'

我正在嘗試導入熊貓分析。

import pandas as pd
!pip install pandas_profiling
import pandas_profiling as pp

但是,有一條錯誤消息說 cannot import name to_html from pandas_profiling.report

我使用 pip 遇到了同樣的錯誤,但在使用 conda 安裝后它就像一個魅力

conda install -c conda-forge pandas-profiling.

如果您不使用 Conda 環境,我建議使用以下命令直接從 github 安裝:

pip 安裝https://github.com/pandas-profiling/pandas-profiling/archive/master.zip

(base) C:\Users\saurabh>conda install -c conda-forge pandas-profiling
Collecting package metadata (repodata.json): done
Solving environment: |

這將在使用 conda 方法后出現......看起來這將解決你和我的問題

上述解決方案不適用於我的情況

在你的 anaconda 提示符上使用它

conda env create -n pandas-profiling
conda activate pandas-profiling
conda install -c conda-forge pandas-profiling

然后你可以在你的編輯器上使用個人資料報告

from pandas_profiling import ProfileReport

它肯定會起作用

我遇到了同樣的錯誤,嘗試conda install -c conda-forge pandas-profiling並開始工作!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM