DEV Community

Cover image for 🪐Jupyter Notebook Cells: Shortcuts🎹
Souh🦋
Souh🦋

Posted on

🪐Jupyter Notebook Cells: Shortcuts🎹

Every data geek and python programmer knows and uses Jupyter notebooks this day and age, as it is a very crucial tool and one of the most important skills every Data related role person needs in his carrer .

In this article i'll be sharing the most common and useful shortcuts that you need in your everyday coding life to be more productive, save time, or just to get rid of the mouse and impress people with your keyboard skills 🤷‍♀️.

Cell type:

There are three main types of cells on Jupyter : Code cells, Markdown cells, and Raw cells.
By default any new cell is a code cell, but it can be changed either with the dropdown on the toolbar or using shortcuts.

For a code cell to run python code:
Press y

For a Markdown cell to display formatted text and media:
Press M

Cell mode:

There are two modes in jupyter notebook, Edit mode and Command mode.

For Edit mode to type code or text in the cell :
Press return

For the command mode to perform general actions on the cells in the notebook:
Press ESC

Add/Delete Cells:

To add a cell above the selected cell : Press a
To add a cell bellow the selected cell: Press b
To delete the selected cell: Press dd

Run Cells:

To Run/Execute the selected cells:
Press cltr+Enter

To Run the selected cell + select below :
Press Shift+Enter

To Run the selected cells + add cell below:
Press alt+Enter

To Run all cells:
Press cltr+A
Press cltr+Enter

Modify Cells:

To Undo : Press Z
To copy : Press C
To cut : Press X
To paste : Press V

There you go! try it out, Increase your efficiency and productivity when using Jupyter Notebook.

Happy coding!🏃‍♀️

Top comments (0)