You have a number of unwanted cells in your notebook and you are on a deletion spree. Unfortunately, you delete a cell that you didn’t intend to delete and now don’t know what to do. Don’t worry, there’s a way to recover back your deleted cell. In this tutorial, we’ll look at how to undo cell deletion in a Jupyter Notebook.
For a quick refresher on the Jupyter Notebook interface, refer to our introductory guide.
How to recover a deleted cell in Jupyter Notebook?
You can recover a deleted cell in a jupyter notebook with the Edit menu. Go to Edit
-> Undo Delete Cells
to undo the delete operation performed on the cells and recover back your deleted cell.
Note that the Undo Delete Cells
option will only be accessible if there are cells that have been deleted.
Keyboard Shortcut to undo cell deletion
You can use a keyboard shortcut to recover your deleted cells in a jupyter notebook. For this, first, switch to command mode using the Esc
key and then press z
to recover your deleted cell.
Note that, both the methods, will undo the cell deletion inside your jupyter notebook one at a time if the cells were also deleted one at a time.
We hope that this tutorial provided some value to you and gave you the information that you needed. Jupyter Notebooks are quite useful and knowing your way around them can certainly speed up your future tasks. You can create and share notebooks containing text, live code, visualizations, etc. It is this versatility that has made Jupyter Notebooks one of the most popular data science tools. Not only are these notebooks preferred by data scientists but they’re also quite popular among researchers across the globe.
Subscribe to our newsletter for more informative guides and tutorials.
We do not spam and you can opt out any time.
Introductory ⭐
- Harvard University Data Science: Learn R Basics for Data Science
- Standford University Data Science: Introduction to Machine Learning
- UC Davis Data Science: Learn SQL Basics for Data Science
- IBM Data Science: Professional Certificate in Data Science
- IBM Data Analysis: Professional Certificate in Data Analytics
- Google Data Analysis: Professional Certificate in Data Analytics
- IBM Data Science: Professional Certificate in Python Data Science
- IBM Data Engineering Fundamentals: Python Basics for Data Science
Intermediate ⭐⭐⭐
- Harvard University Learning Python for Data Science: Introduction to Data Science with Python
- Harvard University Computer Science Courses: Using Python for Research
- IBM Python Data Science: Visualizing Data with Python
- DeepLearning.AI Data Science and Machine Learning: Deep Learning Specialization
Advanced ⭐⭐⭐⭐⭐
- UC San Diego Data Science: Python for Data Science
- UC San Diego Data Science: Probability and Statistics in Data Science using Python
- Google Data Analysis: Professional Certificate in Advanced Data Analytics
- MIT Statistics and Data Science: Machine Learning with Python - from Linear Models to Deep Learning
- MIT Statistics and Data Science: MicroMasters® Program in Statistics and Data Science
🔎 Find Data Science Programs 👨💻 111,889 already enrolled
Disclaimer: Data Science Parichay is reader supported. When you purchase a course through a link on this site, we may earn a small commission at no additional cost to you. Earned commissions help support this website and its team of writers.