2013-08-05 186 views
2

希望我期待用熊猫和IPython都返回了一些,我想复制和粘贴HTML嵌入代码。格式问题/大熊猫

的问题是,输出被裁剪。如何更改设置,以便我可以看到完整的结果?

下面是一个例子:

<h2>Evil Trent</h2><iframe width="560" height=... 

如果我选择使用df.ix [0]你可以看到完整的结果个体元素。

<h2>Evil Trent</h2><iframe width="560" height="315" src="//www.youtube.com/embed/qvX8cfMUPqg" frameborder="0" allowfullscreen></iframe><p>Published by Evan Leonard on Monday August 05.</p> 

我想什么是看到输出的其余部分。在Chrome上的IPython中,这是一个简单的设置问题吗?

回答

3

尝试设置option.display.max_colwidth更大的东西:

In [11]: df 
Out[11]: 
                0 
0 <h2>Evil Trent</h2><iframe width="560" height=... 

In [12]: pd.options.display.max_colwidth 
Out[12]: 50 

增加到200似乎做它:

In [13]: pd.options.display.max_colwidth = 200 

In [14]: df 
Out[14]: 
                                                   0 
0 <h2>Evil Trent</h2><iframe width="560" height="315" src="//www.youtube.com/embed/qvX8cfMUPqg" frameborder="0" allowfullscreen></iframe><p>Published by Evan Leonard on Monday August 05.</p> 

"working with package options" section of the docs

+0

辉煌。我再次感谢你。 – elksie5000