Delete Cell in Jupyter Notebook

We can delete a cell (code/markdown/Raw NBConvert) using 3 ways:

  1. Using keyboard shortcut
  2. Using Menu Buttons
  3. Using ToolBar

1. Keyboard Shortcut

Follow the steps to delete a cell using keyboard shortcut:

  1. Select the cell you want you to delete
  2. Press “Esc” to enter in Command mode if you are in editing mode
  3. If you want to delete multiple cells then you can select the upper cells by using Shift+Up or Shift +K and to select the downward cells use Shift+Down or Shift+J
  4. Press “D D” i.e. press “D” twice to delete
  5. If you want to cut the cell press “X

Note: In command mode, the cell border is blue or depending on your Jupyter theme and the cell content is not highlighted for editing.

You can also edit keyboard shortcuts by selecting Menu option Help -> Edit Keyboard Shortcuts then select Delete cell and add new shortcut key, refer to below screenshots,

Changing shortcut key

2. Using Menu Buttons

  1. Select the cell you want to delete
  2. If you want to delete multiple cells then you can select the upper cells by using Shift+Up or Shift +K and to select the downward cells use Shift+Down or Shift+J
  3. Navigate to Menu Options Edit -> Delete Cells to delete the cell
  4. Refer the below screenshots:

Delete a cell

3. Using Toolbar

  1. Select the cell you want to delete
  2. Click on “Sciscors” icon in the toolbar it will cut the cell

Using Tool bar

Deleting Multiple Cells at Once

  1. To delete multiple cells then you can select the upper cells by using Shift+Up or Shift +K and to select the downward cells use Shift+Down or Shift+J or Shift+Left Click to select the cells
  2. After selecting the cells you can any of the described method to delete the cells

How to Delete Markdown in Jupyter Notebook

In this article, we will cover How to delete markdown in Jupyter Notebook we will discuss various methods to do the same. First, we look at what is Jupyter Notebook and markdown and why we use them, we discuss different methods to delete a markdown in Jupyter Notebook in this article.

Similar Reads

Jupyter Notebook

The Jupyter Notebook is the original web application for creating and sharing computational documents that contain live code, equations, visualizations, and narrative text. It offers a simple, streamlined, document-centric experience. Jupyter has support for over 40 different programming languages and Python is one of them....

Delete Cell in Jupyter Notebook

We can delete a cell (code/markdown/Raw NBConvert) using 3 ways:...

Reordering Cells After Deletions

Cells can be reordered in two ways:...