How to Wrap Long Text Output in Jupyter Notebook for Cleaner Print Display?

20 Replies, 1460 Views

Hey! I’ve been there with Jupyter notebook wrap long text print. It’s such a pain, right?

I found this cool tool called `tabulate` that formats tables nicely. It’s not a direct fix for wrapping, but it makes the output way more readable.

For wrapping, I usually stick to `textwrap` or sometimes even use `pandas` options like `pd.set_option('display.width', 100)`.

If you’re looking for more advanced stuff, check out this blog post on Medium about Jupyter notebook formatting hacks. It’s a goldmine!

Messages In This Thread



Users browsing this thread: 2 Guest(s)