Ipython Notebook: Elegant way of turning off part of cells?

后端 未结 2 1642
面向向阳花
面向向阳花 2021-02-07 01:05

In my ipython notebook, there is part of cells that serves as preliminary inspection.

Now I want to turn it off, since after running it I know

2条回答
  •  野性不改
    2021-02-07 01:10

    Using Jupyter notebook you can click on a cell, press esc and then r. That converts it to a "raw" cell. Similar thing can be done to convert it back, esc + y. No comments needed, just key presses.

    Within Jupyer notebook, go to Help -> Keyboard shortcuts for more.

    Here's a snippet:

    Command Mode (press Esc to enable)

    • ↩ : enter edit mode

    • ⇧↩ : run cell, select below

    • ⌃↩ : run cell

    • ⌥↩ : run cell, insert below

    • y : to code

    • m : to markdown

    • r : to raw

提交回复
热议问题