Python crawler, data analysis, website development and other case tutorial videos are free to watch online
https://space.bilibili.com/523606542
Python learning exchange group: 1039645993
Commonly used shortcut keys:
Command mode (press Esc key):
- Enter: switch to edit mode
- Shift-Enter: Run this unit, select the next unit
- Ctrl-Enter: Run this unit
- Alt-Enter: Run this unit and insert a new unit under it
- Y: Unit transfer to code status
- M: The unit enters the markdown state
- R: The unit goes to raw state
- 1: Set level 1 heading
- 2: Set level 2 heading
- 3: Set level 3 heading
- 4: Set level 4 heading
- 5: Set level 5 heading
- 6: Set 6-level heading
- Up: select the upper unit
- K: Select the unit above
- Down: select the cell below
- J: Select the unit below
- Shift-K: Enlarge and select the upper cell
- Shift-J: Expand and select the cell below
- A: Insert a new unit above
- B: Insert a new unit below
- X: Cut the selected unit
- C: Copy the selected unit
- Shift-V: Paste into the cell above
- V: Paste into the cell below
- Z: Restore the last deleted unit
- D, D: delete the selected unit
- Shift-M: merge selected cells
- Ctrl-S: save file
- S: File save
- L: Conversion line number
- O: Conversion output
- Shift-O: Conversion output scroll
- Esc: close the page
- Q: Close the page
- H: Display shortcut help
- I, I: Interrupt the notebook core
- 0,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: restore
- Ctrl-Shift-Z: Do it again
- Ctrl-Y: do it again
- Ctrl-Home: jump to the beginning of the unit
- Ctrl-Up: jump to the beginning of the unit
- Ctrl-End: jump to the end of the unit
- Ctrl-Down: jump to the end of the unit
- Ctrl-Left: jump to the left of the initial
- Ctrl-Right: jump to the beginning of the word on the right
- Ctrl-Backspace: delete the previous word
- Ctrl-Delete: delete the next word
- Esc: Enter command mode
- Ctrl-M: enter command mode
- Shift-Enter: Run this unit, select the next unit
- Ctrl-Enter: Run this unit
- Alt-Enter: Run this unit, insert a unit below
- Ctrl-Shift--: Split unit
- Ctrl-Shift-Subtract: Split unit
- Ctrl-S: save file
- Shift: ignore
- Up: Move the cursor up or go to the previous unit
- Down: Move the cursor down or go to the next unit
Precautions:
After each cell of jupyter notebook is run, the variables in the cell will be saved in the memory. If the previous variables are modified in a cell, some problems may occur when the cell is run again. For example, the following code:
# 第一个cell中的代码
a = 10
b = 20
# 第二个cell中的代码
c = a/b
b = 0
Because the second cell modifies the b variable, b is equal to 0 in the entire environment at this time, so when the cell is run in the future, a/b will have a problem. At this time, you can use Kernel->Restart&Run All to re-run the entire project.