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

后端 未结 2 1643
面向向阳花
面向向阳花 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:26

    In Jupyter notebooks one can use this magic preamble at the beginning of a cell to avoid its execution.

    %%script false
    

    These added arguments will prevent the notebook from erroring:

    %%script false --no-raise-error
    

提交回复
热议问题