Can't open ipynb juypter notebook file, crashed on a large df

Question:

Panicking.

Spend a long time working on code in Juypter Notebook on macbook (Anaconda) and i accidentally performed df.fillna(0) on a large df, not knowing it was going to try and load the whole thing in Juypter (i have it set to display all)

It crashed and was unresponsive. Now it’s closed and won’t load again (i just get the header UI stuff and nothing else – a bar at the top of the webpage shows loading progress but then stalls). The kernel is grey.

Have I just lost all my work? Other files are working as normal. Just managed to get it to partially load (shows me the first couple of cells but page is unresponsive) and i click interupt kernel in a panic to try and get it to just leave me with the code and stop trying to load anything. No luck yet.

Is there any way of retrieving my code? I don’t care about any calculations

Thanks

Asked By: GlassShark1

||

Answers:

Jupyter notebooks are just stored as JSON. You should be able to open it in a text editor and just pull out the code fields. – answer provided by jprebys
Oct 21 at 13:35

Answered By: GlassShark1
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.