2

hopefully I'm looking to use pandas and IPython to return some HTML embed codes that I'd like to copy and paste.

The problem is that the output is cropped. How do I change the settings so I can see the full result?

Here's an example:

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

If I select individual elements using the df.ix[0] you can see the full result.

<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>

What I'd like is to see the the rest of the output. Is it a simple setting issue in IPython on Chrome?

1 Answer 1

3

Try setting the option.display.max_colwidth to something larger:

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

Increasing to 200 seems to do it:

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>

See "working with package options" section of the docs.

Sign up to request clarification or add additional context in comments.

1 Comment

Brilliant. I owe you again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.