sfu-db / dataprep

Open-source low code data preparation library in python. Collect, clean and visualization your data in python with a few lines of code.
http://dataprep.ai
MIT License
2.07k stars 206 forks source link

Export to HTML not working #972

Open bmage8923 opened 1 year ago

bmage8923 commented 1 year ago

Describe the bug Any plots; be that via plot(), create_report(), or any other method renders fine in the notebook itself, but after converting to HTML via Quarto (utilizes Pandoc for this) the plots do not appear. I get a message stating "Report generated with DataPrep," but no display. I have discovered that saving the report to a file and then displaying it as an iframe does work, however.

Utilizing ydata-profiling (formerly Pandas Profiling) the plots display in the HTML with no problems and no need to display as an iframe. I'm not certain what the difference is between the two packages, perhaps the reports are rendered differently.

To Reproduce Steps to reproduce the behavior:

  1. Create a report or a plot with DataPrep.
  2. Export the notebook to HTML via Pandoc or Quarto

Working:

from dataprep.eda import create_report

# Full report
report = create_report(
    df,
    title="ACLED regional dataset - SE Asia - Myanmar",
    progress=False
)
report.save()

from IPython.display import IFrame

IFrame("report.html", width=1200, height=1300)

Not working:

from dataprep.eda import create_report
report = create_report(df)
report
# report.show()
# report.show_browser()
# None of the above options work

Expected behavior Reports should display in HTML without having to specifically display them as an iframe

Screenshots image image

Desktop (please complete the following information):