Skip to main content

Keyboard Shortcuts used in Most Popular Jupyter Notebook


Jupyter Notebook is a widely used notebook App by Data Scientists because of its rich features. The app allows us to write Python Code as well as rich text elements like formatted paragraphs, Images, links, mathematical equations, etc.

It is a client server-based application that allows programmers, analysts for editing notebooks, write and execute python codes by browsers.

JIMS, BCA course includes Python in the first year and AI using Python in the final year. Students are asked to work on Jupyter Notebook. As a student and to become a skilled developer, one must know the shortcuts to be used in any application.

In this article, students can find the list of shortcuts they can use while practicing in Python and later on while learning AI using Python.

JIMS, Vasant Kunj-II, is one of the best BCA colleges in Delhi NCR, which provides an updated curriculum. The syllabus includes almost all the latest technologies that are in demand including Analytics using Excel, Tableau, Power BI.

The two different keyboard input modes used while writing command and text contents are:

1) Command Mode: This mode allows you to edit the notebook as a whole, not into individual cells. The mode actually binds the keyboard to notebook-level actions. Indicated by a grey cell border with a blue left margin.

2) Edit Mode: This mode allows you to type into the cells like a normal text editor. In this mode when you’re typing in a cell. Indicated by a green cell border.

While working in the Jupyter Notebook, you can switch between the two modes.

Three different special keys used in combination with characters are Ctrl, Alt, Shift keys. Various Shortcut Keys which are used for different purposes in two different modes are:

To change the cells from Code to Markdown

Esc+M: Markdown

Esc+Y: Code

To move to Command Palette

Cmd + Shift + p


Shortcut Keys used in both the Modes

 

S.No.

Short Cut Key

Remarks

1

Shift+Enter

Runs the Current Cell and Select Below

2

Ctrl+Enter

Runs Selected Cells

3

Alt+Enter

Runs the Current Cell, Insert Below

4

Ctrl+S

Save and Checkpoint

 

Short Cuts to be used in Command Mode

To activate Command Mode press Esc.

 

S.No.

Short Cut Key

Remarks

1

Esc + Enter

Take you into Edit Mode

2

Esc + H

Displays all Shortcuts

3

Esc + Up Arrow

Selects Cell Above

4

Esc + Down Arrow

Selects Cell Below

5

Esc + Shift +Up

Extended Selects Cell Above

6

Esc + Shift + Down

Extended Selects Cell Below

7

Esc + A

Insert Cell Above

8

Esc + B

Insert Cell Below

9

Esc + X

Cut Selected Cells

10

Esc + C

Copy Selected Cells

11

Esc + V

Paste Cells Below

12

Esc + Shift + V

Paste Cells Above

13

Esc + D D (twice press D)

Delete Selected Cells

14

Esc + Z

Undo Cell Deletion

15

Esc + S

Save and Checkpoint

16

Esc + Y

Change the Cell Type to Code

17

Esc + M

Change the Cell Type to Markdown

18

Esc + P

Open the Command Palette

19

Esc + Shift + Space

Scrolls Notebook UP

20

Esc + Space

Scrolls Notebook DOWN

21

Esc + Shift + Enter

Run Cell, Select Below

22

Esc + Ctrl + Enter

Run Cells

23

Esc + Shift + M 

When you’re typing in a cell. Indicated by a green cell border

24

Esc + 0, 0 

 

Restart Kernel (with dialog)

Short Cuts to be used in Edit Mode

To activate Edit Mode press Enter

 

S.No.

Short Cut Key

Remarks

1

Enter + Esc

Take you into Command Mode

2

Enter + Tab

Code Completion or Indent

3

Enter + Shift + Tab

Tooltip

4

Enter + Ctrl +]

Indent

5

Enter + Ctrl + [ 

Dedent

6

Enter + Ctrl + A 

Select All

7

Enter + Ctrl + Z 

Undo

8

Enter + Ctrl + Shift + Z or Enter + Ctrl + Y

Redo

9

Enter + Ctrl + Home

Go to Cell Start

10

Enter + Ctrl + End

Go to Cell End

11

Enter + Ctrl + Left

Go one Word Left

12

Enter + Ctrl + Right

Go one Word Right

13

Enter + Ctrl + Shift + P

Open the Command Palette

14

Enter + Down

Move Cursor Down

15

Enter + Up

Move Cursor Up

16

Cmd + / 

 

Toggle Comment Lines

17

Ctrl + Shift + - 

Split the Cells

 

 

 Markdown Syntax Used in Jupyter

 

Markdown is used by Data Scientists and Analysts for inserting text, formatting it so that the developer code can be easily understood by the reader. The various options provided enable the developer to maintain a writing and documentation standard.

Using Markdown comments can also be included in the Notebook.

It includes Markups and is similar to HyperText Markup Language (HTML).   It is a lightweight Markup Language and easily shared among various devices and people.

The various standard used in the document is converted into the corresponding HTML by the Markdown processor.

The document can be formatted by using Markup tags and following the Markdown syntax which is supported by Jupyter Notebook.

Short Cuts to be used in Markdown

Various Formatting Options 

S.No.

Formatting Option

How to Use

1

Different levels of Headings

 

Use #, ##,### etc level wise

 

2

Bold Text

 

Use ** or __

3

Italic Text

Use * or _

 

4

Line Breaks

Use Run Command

5

Horizontal Lines

Use '---' three hyphens

Different types of Lists: Ordered and Unordered Lists

 

6 a)

Ordered List

Use the required number followed by space

6 b)

Unordered Lists

Black Circle Symbol: Start with the '-' symbol with space

Black Square Symbol: Start with the '*' symbol with space

Different types of Links: Internal and External Link

 

7 a)

Internal Link

Markdown starts with <a> tag with unique id defined by the attribute 'id' which can be linked in the notebook

<a id = "division_ID"text goes here></a>

Also, the id defined above can be linked to the section of the notebook by following the code which makes the link clickable.

[Section title](#division_ID)

 

7 b)

External Link

Start with the __ [text link] (URL for the site) __ where the double underscore is on both sides with the text link enclosed in a square bracket and the URL for the site is enclosed in a parenthesis followed by the URL

8

Table

Rows and columns are used as a combination of '|' i.e. 'vertical pipe' to separate each column

'-' hyphen symbol to create the header where the blank line, i.e., a combination of vertical pipe and dashes to render the table format.

9

Image

You can insert an image from the toolbar by choosing the 'Insert Image' from an Edit menu and can browse the required image

 

10

Code section

Enclose within three backticks ```

 

11

Mathematical Symbol

Enclose within $

 

Conclusion: The various Keywords shortcuts have increased the usage and productivity of the Jupyter Notebook. It is one of the powerful and effective tools used by Python developers, Data Scientists, and data analysts. Developers feel easy to use the trial and error approach can observe the output and can perform modifications if required. It saves the developer time and makes presentable, easy-to-understand notebooks including documentation along with Code.

I hope JIMS BCA students will like the article and use the above shortcuts while learning Python, AI using Python, Machine Learning. The document will help them in the future also. All the best to JIMS BCA Students.

Dr. Arpana Chaturvedi

HOD-IT

Department of Information Technology and Software Development BCA

JIMS, Vasant Kunj-II

 

Comments

Post a Comment

Popular posts from this blog

Machine Learning and Role of Model in Machine Learning

Machine Learning concept is used in developing different modeling technique that involves Data means information such as documents, images, etc. The modeling technique analyzes the data and finds the suitable model by itself rather than having human interference in it. Data used by the Machine Learning modeling process are of two types, one is called “Training” data and the second one is “Test” Data. The primary idea of Machine Learning is to achieve a model using the training data. Types of Machine Learning Techniques: There are three types of Machine Learning Modelling Techniques. These are: Supervised Learning : In this Modelling Technique each training dataset should consist of input and correct output pairs. Unsupervised learning: This modeling technique is used for investigating the characteristics of the data and for preprocessing the data Reinforcement learning: This technique employs sets of input, some output, and grade as training data. Fig. 1. Types of Machi...
  Flutter – The Future of Mobile App Developer Flutter is a very popular Googles SDK used popularly for Mobile App Development. The Mobile App Developers feels easy to use Flutter because of its features like cross-platform Application, customized plenty of Easy-to-use Widgets and is a single codebase for any platform. Introduction: Flutter is a Cross-Platform App Development Framework enables the programmer to build an application that can run on Android as well as iOS. It uses a common codebase to design an application as it has an engine designed in the most popular language, C++, commonly used by everyone and easy to understand. Flutter is a Google product and the alpha version of Flutter was released at Google I/O/2017 and since then it has been improved drastically by all of its leaps and bounds. Google developed to assist ambient computing and becomes so popular because of its powerful and easy-to-use features. It is used by many Companies like Grab, Groupon, eBay, ...