I've searched across stackoverflow and a number of other sites and Im not quite finding the answer to my problem. In short, when I run Python from either the interactive command line or from a source file in Canopy, and that code involves attempting to display a panda dataframe or even manual markup as html, it does not work. I simply get the following output:
<IPython.core.display.HTML object>
I have checked preferences and have looked for other possible sources of error. I have tried different combinations of imports and diplay methods as below. They all return the same thing above, never the actual HTML.
#from IPython.display import HTML
#from IPython.core.display import display
#display_html(av.head(10).to_html())
from IPython.display import display, HTML
display(HTML('<h1>Hello World</h1>'))
Note that av is just a dataframe.
Any help would be appreciated. I feel like there is a ridiculously simple fix I am missing.
Hello World
').data`. For a DataFrame, just using `to_html()` by itself (without using any of the IPython display stuff) will give you the HTML representation. – BrenBarn Jun 25 '16 at 22:57