Skip cells when running Jupyter Notebook scripts
There is a surprisingly simple way to turn off specific cells in Jupyter Notebook without having to manually comment-out chunks of code.
The simple solution is to place the cursor into the cell that you want to silence, then press
r. The cell will then transform into “raw” (Raw NBConvert) format and be skipped-over when the entire script is run.
To revert it back, press
y to return it to “code” format for re-inclusion.
If you simply want to comment-out a single cell, you can highlight the text and press
/. This can be toggled.
One response to “Skip cells when running Jupyter Notebook scripts”