<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Displaying HTML Output in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28460#M20256</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Took me a while to find a simple solution. Found two ways. Hope they work.&lt;/P&gt;
&lt;P&gt;1. &lt;/P&gt;
&lt;P&gt;- Read the html file content &lt;/P&gt;
&lt;P&gt;html_file_content = open("output.html", 'r').read()&lt;/P&gt;
&lt;P&gt;- Use displayHTML on the html_file_content&lt;/P&gt;
&lt;P&gt;displayHTML(html_file_content)&lt;/P&gt;
&lt;P&gt;2. Note: df is the dataframe &lt;/P&gt;
&lt;P&gt;profile = pp.ProfileReport(df) &lt;/P&gt;
&lt;P&gt;p = profile.to_html() &lt;/P&gt;
&lt;P&gt;displayHTML(p)&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2019 11:20:11 GMT</pubDate>
    <dc:creator>anandkn1884</dc:creator>
    <dc:date>2019-02-25T11:20:11Z</dc:date>
    <item>
      <title>Displaying HTML Output</title>
      <link>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28458#M20254</link>
      <description>&lt;P&gt; I am trying to display the html output or read in an html file to display in databricks notebook from pandas-profiling.&lt;/P&gt;&lt;P&gt;import pandas as pd import pandas_profiling &lt;/P&gt;&lt;P&gt;df = pd.read_csv("/dbfs/FileStore/tables/my_data.csv", header='infer', parse_dates=True, encoding='UTF-8')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;profile = pandas_profiling.ProfileReport(df) Out[13]: &amp;lt;pandas_profiling.ProfileReport at 0x7f30e0b55780&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;profile.to_html() Out[19]: '&amp;lt;!doctype html&amp;gt;\n\n&amp;lt;html lang="en"&amp;gt;\n&amp;lt;head&amp;gt;\n &amp;lt;meta charset="utf-8"&amp;gt;\n\n &amp;lt;title&amp;gt;Profile report&amp;lt;/title&amp;gt;...&lt;B&gt;&lt;I&gt; WARNING: skipped 429584 bytes of output &lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Error on dislpayHtml()&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;displayHTML(profile)Py4JException: An exception was raised by the Python Proxy. Return Message: x&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; I could also output to html file:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;profile.to_file(outputfile="/tmp/my_profiling.html")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; but how would I read that in? is there a %html command?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 17:52:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28458#M20254</guid>
      <dc:creator>DavidWrench</dc:creator>
      <dc:date>2018-10-08T17:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying HTML Output</title>
      <link>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28459#M20255</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I am sorry it is a mess, the code formatting on here does not escape the code I tried to embed.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 17:59:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28459#M20255</guid>
      <dc:creator>DavidWrench</dc:creator>
      <dc:date>2018-10-08T17:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying HTML Output</title>
      <link>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28460#M20256</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Took me a while to find a simple solution. Found two ways. Hope they work.&lt;/P&gt;
&lt;P&gt;1. &lt;/P&gt;
&lt;P&gt;- Read the html file content &lt;/P&gt;
&lt;P&gt;html_file_content = open("output.html", 'r').read()&lt;/P&gt;
&lt;P&gt;- Use displayHTML on the html_file_content&lt;/P&gt;
&lt;P&gt;displayHTML(html_file_content)&lt;/P&gt;
&lt;P&gt;2. Note: df is the dataframe &lt;/P&gt;
&lt;P&gt;profile = pp.ProfileReport(df) &lt;/P&gt;
&lt;P&gt;p = profile.to_html() &lt;/P&gt;
&lt;P&gt;displayHTML(p)&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 11:20:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28460#M20256</guid>
      <dc:creator>anandkn1884</dc:creator>
      <dc:date>2019-02-25T11:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying HTML Output</title>
      <link>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28461#M20257</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Have you tried using&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;displayHTML(profile.to_html())&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It worked for me, but I didn't have the warning or Exception, you had, when I used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;displayHTML(profile)&lt;/CODE&gt;&lt;/PRE&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2019 09:36:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28461#M20257</guid>
      <dc:creator>christopher_bro</dc:creator>
      <dc:date>2019-03-22T09:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying HTML Output</title>
      <link>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28462#M20258</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;What eventually worked for me was displayHTML(profile.to_html()) for the pandas_profiling and displayHTML(profile&lt;B&gt;.html&lt;/B&gt;) for the spark_profiling.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 00:06:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/displaying-html-output/m-p/28462#M20258</guid>
      <dc:creator>Bendu_Preez</dc:creator>
      <dc:date>2019-03-24T00:06:04Z</dc:date>
    </item>
  </channel>
</rss>

