Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pandas Profiling doesn't display the output

Good Morning,

I have the following dataframe:

print(df)

                  Company              ...      Sales
0                  Medi ltd.           ...      4.16000
1                  Pia  ltd.           ...      2.59907

[26958 rows x 15 columns]

But whenever I run:

import pandas_profiling as pp
pp.ProfileReport(df)

It just outputs, withouth plots or frames:

Out[92]: <pandas_profiling.ProfileReport at 0x1131e0668>

I tried generating a sample df, but it doesn't work either:

print(sample)

     Col1 Col2
Row1    1    2
Row2    3    4

How can I solve this issue?

like image 223
Alessandro Ceccarelli Avatar asked Oct 19 '25 10:10

Alessandro Ceccarelli


1 Answers

Answer for future reference:

  • This is not a pandas-profiling specific issue. Spyder does seem to have issues with displaying HTML, more information can be found in this disscussion: https://github.com/spyder-ide/spyder/issues/4582

  • A quick workaround would be to save the report to a file. You can do that like this:

report = pp.ProfileReport(df)
report.to_file('profile_report.html')
like image 189
Simon Avatar answered Oct 22 '25 00:10

Simon