Search code examples
python-3.xjupyter-notebookformattingsettings

Jupyter notebook truncates value inside of individual cells (not rows or columns, but the text)


Python 3.9.10
notebook==6.4.8
Linux VERSION="22.04 (Jammy Jellyfish)"

I have data including very long UUID strings. Regardless of how many rows or columns are being shown in the Jupyter output, the long UUID strings are being truncated in each individual cell...

I.e.

97bd13ed-e982-482a-9fab-23fc3e588dfd_b207580a-d8bc-4fce-b125-699b03973116

...appears as...

Truncated string in cell

Is there a setting to allow the full string to appear in the cell?


Solution

  • To see all the full text, you could use pd.set_option('display.max_colwidth', None)

    or if you want to have this for only one display:

    with pd.option_context('display.max_colwidth', None):
        display(df)