user2808117
user2808117

Reputation: 4877

How to load a notebook without the outputs?

I mistakenly printed to much to the output during a single cell's execution and now the browser tab completely freezes every time that notebook is opened. I tried restarting ipython and it didn't help (I am guessing that each time it is loaded, also all the chunk of text is loaded with it).

Is there a way to load a notebook with outputs suspended or clear?

Upvotes: 3

Views: 1770

Answers (3)

Shivaraj Mulimani
Shivaraj Mulimani

Reputation: 11

your code will be saved in the form of JSON. open it with json viewer and carefully delete the unwanted output cell and save it back.

Upvotes: 0

David Ketcheson
David Ketcheson

Reputation: 4285

nbstripout is a simple tool that removes all output from a notebook (without needing to open the notebook in your browser).

Upvotes: 2

David Ketcheson
David Ketcheson

Reputation: 4285

One hack if you're desperate: open the .ipynb file, which is a text file. Scroll down to the lengthy cell output and delete it. Of course, you need to be careful that the result is still a valid .ipynb file.

Upvotes: 2

Related Questions