7

I am trying to import pandas profiling.

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

However, there is a error message saying that cannot import name to_html from pandas_profiling.report

jary
  • 1,161
  • 6
  • 9
ALT
  • 135
  • 2
  • 8

2 Answers2

0

I got the same error using pip, but it worked like a charm after using the conda install

conda install -c conda-forge pandas-profiling

If you're not using Conda environment, i'd suggest install directly from the github using:

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

Ryan M
  • 18,333
  • 31
  • 67
  • 74
0

the above solution was not working in my case

use this on your anaconda prompt

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

then you can use profile report on your editor

from pandas_profiling import ProfileReport

it will work for sure

jary
  • 1,161
  • 6
  • 9