Pandas display.max_colwidth option that prevents truncation of the fields

Stop pandas truncating output width …

I’m new to pandas (the first time touched it was 45 minutes ago), but I was wondering how can I stop pandas from truncating output width.

You know that annoying ... at the end of a field?!

So there is a magic display.max_colwidth option (and many other wonderful options).

From the official docs:

display.max_colwidth : int or None
    The maximum width in characters of a column in the repr of
    a pandas data structure. When the column overflows, a "..."
    placeholder is embedded in the output. A 'None' value means unlimited.
    [default: 50] [currently: 50]
Here are a couple of examples on how to use it:
Pandas display.max_colwidth option that prevents truncation of the fields

`

More posts related to my AI journey:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.