Search code examples
pythonpandaspandas-profiling

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?


Solution

  • 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')