Detailed Jupyter Notebook

Jupyter Notebook (previously known as IPython notebook) is an interactive coding environment, essentially a web application that facilitates the creation and sharing of program documentation, supporting live code, mathematical equations, visualizations, and markdown. Commonly used in data cleaning and transformation, numerical simulation, statistical modeling and machine learning.
Interactive environment, you can run a piece of code at a time, and the result of the operation will be saved in memory, unlike IDE, the memory will be emptied after one run.

Instructions:

Install Anaconda on your computer and type in the terminal:

jupyter notebook

It will open at localhost:8888 in the local browser

Use shortcut keys

Reference: http://blog.konghy.cn/2017/05/04/jupyter-notebook-hotkeys/
Notebook has two keyboard input modes. That is, command mode and edit mode, which are somewhat similar to Vim. In edit mode, you can type code or text into the cell. At this time, the cell is surrounded by a green frame, and the shortcut keys in command mode do not take effect. In command mode, you can use shortcut keys to run cells, move cells, switch the editing state of cells, etc. At this time, the cells are surrounded by a gray frame, and the shortcut keys in edit mode do not take effect.

To enter edit mode from command mode, press Enter , and to switch from edit mode to command mode, press Esc .

Command mode shortcuts (press Enter to start):

  • Enter to enter edit mode
  • Shift-Enter runs this unit, selects the next unit and the new unit defaults to command mode
  • Ctrl-Enter to run this unit
  • Alt-Enter run this unit, insert a new unit under it The new unit defaults to edit mode
  • Y unit goes to code state
  • M unit goes to markdown state
  • R unit goes to raw state
  • Up selects the upper cell
  • Down selects the cell below
  • Shift-K Continuously select the upper cells
  • Shift-J Continuously selects lower cells
  • A insert new cell above
  • B insert new cell below
  • X cut selected cells
  • C Copy selected cells
  • Shift-V paste to cell above
  • V paste to the cell below
  • Z restores the last unit deleted
  • D,D Delete the selected cell Press two D keys in succession
  • Shift-M Merge selected cells
  • Ctrl-S saves the current NoteBook
  • S Save the current NoteBook
  • L switch the line number of the line number edit box can be turned on and off
  • O Convert output
  • Shift-O Transform output scroll
  • Esc to close the page
  • Q close the page
  • H Show shortcut help
  • I,I interrupt NoteBook kernel
  • 0,0 Restart the NoteBook kernel
  • Shift ignore
  • Shift-Space to scroll up
  • Space scroll down

Edit mode shortcuts (press Enter to start):

  • Tab code completion or indentation
  • Shift-Tab prompts to output help information. Some functions, classes, methods, etc. will display their definition prototypes. If you add ? after them and run them, more detailed help will be displayed.
  • Ctrl-] indent indent right
  • Ctrl-[ Unindent Indent left
  • Ctrl-A select all
  • Ctrl-Z Undo
  • Ctrl-Shift-Z Redo
  • Ctrl-Y Redo
  • Ctrl-Home Jump to the beginning of the cell
  • Ctrl-Up Jump to the beginning of the cell
  • Ctrl-End Jump to the end of the cell
  • Ctrl-Down Jump to end of cell
  • Ctrl-Left jump to the left one initial
  • Ctrl-Right Jump to the right one initial
  • Ctrl-Backspace delete the previous word
  • Ctrl-Delete delete the next word
  • Esc switches to command mode
  • Ctrl-M switch to command mode
  • Shift-Enter runs this unit, selects the next unit and the new unit defaults to command mode
  • Ctrl-Enter to run this unit
  • Alt-Enter run this unit, insert a new unit below the default is edit mode
  • Ctrl-Shift – split cells are split according to the line where the cursor is located
  • Ctrl-Shift-Subtract Split Cells
  • Ctrl-S saves the current NoteBook
  • Shift ignore
  • Ctrl-/ Comment entire line/Uncomment only code status

Write documents in markdown format

write picture description here

write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325382966&siteId=291194637