使用Canopy 1.7.1.3323 / IPython 4.1.2无法正确呈现HTML [英] HTML not rendering properly with Canopy 1.7.1.3323 / IPython 4.1.2
问题描述
我刚刚升级到Canopy 1.7.1;我认为这个问题源于IPython版本从2.4.1到4.1.2的变化。
I've just upgraded to Canopy 1.7.1; I think this problem stems from the change in IPython version from 2.4.1 to 4.1.2.
我遇到的问题是在Python中调用DataFrame对象似乎使用 __ print __
方法,即输入 print df
和 df $ c之间没有区别$ c>进入解释器,不幸的是,这给了我一个全文输出,而不是我通常得到的漂亮的表。
The issue I have is that calling a DataFrame object in Python seems to use the __print__
method, i.e. there's no difference between typing print df
and df
into the interpreter, and unfortunately this gives me an all-text output rather than the nice tables I normally get.
所以我得到的东西看起来就像这样当我打电话给 df
而不是一张桌子时:
So I get something that looks exactly like this when I call df
rather than a table:
date flag
1 20151102 0
98663 20151101 1
这是在升级,我也尝试更新我的所有包。我还查看了这个和这个,但没有一个解决方案适合我。 ('display.notebook_repr_html'
已经 True
)
This happened immediately after the upgrade, and I also tried updating all my packages. I've also looked at this and this, but none of the solutions there work for me. ('display.notebook_repr_html'
is already True
)
编辑:问题似乎与渲染HTML有关;从IPython.core.display导入显示输入
The issue seems to do with rendering HTML; typing in
from IPython.core.display import display, HTML
display(HTML('<h1>Hello, world!</h1>'))
返回
<IPython.core.display.HTML object>
推荐答案
故意禁用此功能。我已经请求了一种方法让它重新启用但不受支持。
This has purposely been disabled. I have requested a way to have it re-enabled but but unsupported.
请参阅请求。 https://github.com/jupyter/qtconsole/issues/165
这篇关于使用Canopy 1.7.1.3323 / IPython 4.1.2无法正确呈现HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!