qtconsole not rendering pandas dataframes as html notebook_repr_html option

非 Y 不嫁゛ 提交于 2019-12-03 01:02:50

As far as I know, the notebook_repr_html option only applies to the actual IPython Notebook and not the QTConsole.

In the QTConsole, you can do:

from IPython.display import HTML
import numpy as np
import pandas

df = pandas.DataFrame(np.random.normal(size=(75,5)))
HTML(df.to_html())

One problem you might encounter is if the HTML is too long for your QTConsole's buffer. In that case nothing will show up, in my experience.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!