PyCharm
 
2021.1
Get PyCharm
You are viewing the documentation for an earlier version of PyCharm.

Run and debug Jupyter notebook code cellsProfessional

Last modified: 03 July 2021

This is a Professional feature: download PyCharm Professional to try.

Shortcut: Ctrl+Enter

Code fragments in a Jupyter notebook file are structured as executable cells. Each cell is marked with the #%% comment and can be executed independently by clicking the Run cell icon in the gutter. To execute all cells at once, click Run cell on the Jupyter toolbar.

https://resources.jetbrains.com/help/img/idea/2021.1/py_jupyter_cell_run.png
Gif

When you stop the server and change the server or kernel, you have to execute all cells with dependencies again, because execution results are valid for the current server session only.

When you work with a substantial number of code cells, you can effectively navigate between the Editor and Preview panes by using auto scrolling.

PyCharm provides the full-functional Jupyter Notebook Debugger.

With PyCharm you can always quickly preview reference documentation for a particular variable, type, or argument.

Note that the Introspection tab shows documentation for the latest requested code element. Even though you proceed with executing other code cells, restart the server, or delete the line with your request, this information will be shown.