Skip to content

HTML rendering of dataframes no longer working #14706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Gitman-code opened this issue Nov 22, 2016 · 6 comments
Closed

HTML rendering of dataframes no longer working #14706

Gitman-code opened this issue Nov 22, 2016 · 6 comments

Comments

@Gitman-code
Copy link

Code Sample, a copy-pastable example if possible

import numpy as np
import pandas as pd
arrays = [np.hstack([ ['one']*3, ['two']*3]), ['Dog', 'Bird', 'Cat']*2]
columns = pd.MultiIndex.from_arrays(arrays, names=['foo', 'bar'])
df = pd.DataFrame(np.zeros((3,6)),columns=columns,index=pd.date_range('20000103',periods=3))
df

Problem description

The HTML table of a dataframe is no longer rendering in the most recent versions. I am not sure if this is an issue that should be solved in Pandas or IPython but the symptom is in pandas. The shortest way to a reproduction of the issues is to install a fresh build of Canopy and run the above code. I have talked with the Canopy people and they have desire to see this fixed but no bandwidth to do it themselves. Some more info is on the related stack overflow question http://stackoverflow.com/questions/37041696/html-not-rendering-properly-with-canopy-1-7-1-3323-ipython-4-1-2

@jreback
Copy link
Contributor

jreback commented Nov 22, 2016

how is this a pandas issue?
html rendering has not changed in a while

you also don't indicate versions as the issue tracker requests

@TomAugspurger
Copy link
Contributor

From the SO question, if canopy isn't rendering

from IPython.core.display import display, HTML
display(HTML('<h1>Hello, world!</h1>'))

as HTML, then there's nothing pandas can do to get the HTML to show up.

@Gitman-code
Copy link
Author

Sorry guys, I am a little out of my depth here and just wanted to try and get some attention to the issue. Is it an IPython issue then? Are there other packages which could influence this behaviour?

As for versions, since I don't know which package the issue comes from I don't know which versions either. As I mentioned the issue exists in the current Canopy Express build. The package list is here https://www.enthought.com/products/canopy/package-index/ but I suppose you are only interested in knowing that it is Ipython 4.1.2 and pandas 0.18.0

@jorisvandenbossche
Copy link
Member

Yes, this is a IPython 'issue' since it is caused by your upgrade of IPython 2.4 to 4.x. But, as far as I know it was a very deliberate choice of them to disable html output because it didn't work well enough.

See #7372, ipython/ipython#5763

@Gitman-code
Copy link
Author

Thank you that really helps. Do you know of any documentation for this decision? I would like to find out if this is a setting which could be re-enabled. It was a great feature for Pandas and I will surely miss it if I can't find a way to get it back.

@jorisvandenbossche
Copy link
Member

@DrEhrfurchtgebietend I am afraid that there is no way, but in any case you will have to ask that to the IPython guys. Qtconsole now lives in a separate repo (jupyter/qtconsole), similar request here: jupyter/qtconsole#55 which was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants