Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the 68 commonly used shortcut keys of Jupyter notebook in Python?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Python Jupyter notebook 68 commonly used keyboard shortcuts are which, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Common shortcut keys:

Command mode (press ESC):

Enter: switch to edit mode

Shift-Enter: run this unit and select the next unit

Ctrl-Enter: run this module

Alt-Enter: run this unit and insert a new unit under it

Y: the unit goes to the code state

M: the unit is transferred to markdown state.

R: the unit is transferred to raw state.

1: set level 1 title

2: set level 2 title

3: set level 3 title

4: set level 4 title

5: set level 5 title

6: set level 6 title

Up: select the cell above

K: select the upper unit

Down: select the unit below

J: select the lower unit

Shift-K: enlarge the selection of the upper unit

Shift-J: enlarge the selection of the lower unit

A: insert a new cell above

B: insert a new cell below

X: cut the selected cell

C: copy the selected cell

Shift-V: pasting to upper cell

V: paste to the unit below

Z: restore the last unit deleted

Dminute D: delete the selected cell

Shift-M: merging selected cells

Ctrl-S: file save

S: file save

L: convert line number

O: convert output

Shift-O: conversion output scrolling

Esc: closing pages

Q: close the page

H: show shortcut key help

I I: interrupt the Notebook kernel

0pr 0: restart the Notebook kernel

Shift: ignore

Shift-Space: scroll up

Space: scroll down

Edit mode:

Tab: code completion or indentation

Shift-Tab: prompt

Ctrl-]: indent

Ctrl- [: unindent

Ctrl-A: select all

Ctrl-Z: recovery

Ctrl-Shift-Z: do it again

Ctrl-Y: do it again

Ctrl-Home: skip to the beginning of the unit

Ctrl-Up: skip to the beginning of the unit

Ctrl-End: skip to the end of the cell

Ctrl-Down: skip to the end of the cell

Ctrl-Left: skip to the prefix on the left

Ctrl-Right: skip to the prefix on the right

Ctrl-Backspace: delete the previous word

Ctrl-Delete: delete the last word

Esc: enter command mode

Ctrl-M: enter command mode

Shift-Enter: run this unit and select the next unit

Ctrl-Enter: run this module

Alt-Enter: run this unit and insert a unit below

Ctrl-Shift--: division unit

Ctrl-Shift-Subtract: division unit

Ctrl-S: file save

Shift: ignore

Up: move the cursor up or into the previous unit

Down: move the cursor down or into the next unit

Note:

After each cell of jupyter notebook is run, the variables in this cell will be saved to memory. If you modify the previous variables in a cell, running this cell may cause some problems. For example, the following code:

# Code a = 10b = 2in the first cell, code c = a/bb = 0 in the second cell

Because the second cell modifies the b variable, b is equal to 0 in the whole environment, so when you run the cell later, there will be a problem with this cell. At this point, you can use Kernel- > Restart&Run All to rerun the entire project.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report