jupyter-notebookjupyter

How to recover deleted Jupyter notebook cell?


I use Jupyter notebook. I accidentally deleted a cell, and I can't go step back.

How can I recover the notebook cell?


Solution

  • If you go to "Edit", there's an option for "Undo Delete Cells".

    In MacOS

    If you are familiar with shortcuts, you can do cmd + shift + p and then type in undo to recover as well. No need to moving your mouse around.

    In Windows

    First, switch to command mode by pressing ESC, then you can press Z to recover the deleted cells. (Thanks to @nik7 who proposed this answer)