I'm trying to display a PySpark dataframe as an HTML table in a Jupyter Notebook, but all methods seem to be failing.
Using this method displays a text-formatted table:
import pandas
df.toPandas()
Using this method displays the HTML table as a string:
df.toPandas().to_html()
This prints the non-resolved HTML prettier, but it doesn't resolve into a table:
print(df.toPandas().to_html())
And, all of these
from IPython.display import display, HTML
HTML(df.toPandas().to_html())
print(HTML(df.toPandas().to_html()))
display(HTML(df.toPandas().to_html()))
Simply print this object description:
<IPython.core.display.HTML object>
Any other ideas I can try?