jupyter - how to comment out cells?

后端 未结 4 1213
粉色の甜心
粉色の甜心 2021-02-03 21:17

Is it possible to comment out whole cells in jupyter?

I need it for this case:

I have a lot of cells, and I want to run all of them, except for a few of them. I

4条回答
  •  佛祖请我去吃肉
    2021-02-03 22:04

    If you switch the cell to 'raw NBConvert' the code retains its formatting, while all text remains in a single font (important if you have any commented sections), so it remains readable. 'Markdown' will interpret the commented sections as headers and change the size and colour accordingly, making the cell rather messy.

    On a side note I use this to interrupt the process if I want to stop it - it seems much more effective than 'Kernel --> Interrupt'.

提交回复
热议问题