4

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?

9
  • What does it show if you do pp.ProfileReport(df).to_html()? Commented Sep 28, 2018 at 10:25
  • '<!doctype html>\n\n<html lang="en">\n<head>\n <meta charset="utf-8">\n\n <title>Profile report</title>\n <meta name="description" content="Profile report generated by pandas-profiling. See GitHub.">\n <meta name="author" content="pandas-profiling">\n <script src="ajax.googleapis.com/ajax/libs/jquery/1.11.3/…>\n\n (...) Commented Sep 28, 2018 at 10:34
  • 1
    And if you do from IPython.core.display import display, HTML;display(HTML(pp.ProfileReport(df).to_html())) Commented Sep 28, 2018 at 10:38
  • This is the output: <IPython.core.display.HTML object> Commented Sep 28, 2018 at 12:18
  • Looks like a problem with Jupyter Commented Sep 28, 2018 at 13:18

1 Answer 1

4

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')
Sign up to request clarification or add additional context in comments.

1 Comment

I'm running this in a conda environment in vs code and I don't get any output, error or otherwise, with trying any of this. Any thoughts why this may be occuring? I can open a new question if needed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.