Jupyter Notebook is a Python editor. It is very commonly used by data analysts and machine learning developers. It has a unique interface which makes coding very much organized and readable. The place where the code is written is known as the cells of the notebook. When you open a new notebook, by default, you will find one cell and as you start writing code and executing, a new cell will be added. In this short article, we are going to discuss how to delete a cell in Jupyter Notebook. We can delete the cell by selecting the cell and then clicking on the scissor icon on the top menu.
How to Delete Cell in Jupyter Notebook?
There are many ways to delete the cell in Jupyter Notebook. One of the simplest methods is to select the cell, and then click on the scissor icon on the top menu.
Here are the steps to delete a cell.
- Select the cell which you want to delete
2. Now go to the top section (menu) and click on the scissor icon. This will delete the selected cell.
Now the cell that had selected before clicking the scissor icon will disappear.
Delete the Cell Using Shortcut Keys
There are other methods to delete the cell as well. We can use the shortcut keys from our keyboard to delete the cell. To delete the cell using the shortcut, please follow the given instructions.
- Select the cell
- Make sure you are on the cell, not inside the cell.
- Click the D button on the keyboard twice
- The cell will be deleted.
How to Delete Multiple Cells?
Deleting multiple cells in Jupyter Notebook is very simple and very similar to the previous method.
- Select any cell
- Click the Shift + down button to select multiple cells
- Either use the scissor icon or the d+d button to delete the selected cells.
Working with Jupyter Notebook makes your code easy to understand because it divides each section into different cells. Sometimes, we need to get rid of some cells and we learned how to delete those unwanted cells in Jupiter notebook using different methods.
- Install Pandas on Jupyter Notebook in 4 Ways
- How to Install Lightgbm? Vs Code, Jupyter Notebook, Colab
- How to Install PyCaret? VS Code, Jupyter Notebook, Anaconda