JetBrains DataSpell 2021.1 Help

Jupyter notebooks

With Jupyter Notebook integration available in JetBrains DataSpell, you can easily edit, execute, and debug notebook source code and examine execution outputs including stream data, images, and other media.

jupyter notebook

Notebook support in JetBrains DataSpell includes:

  • Editing and preview:

    • Ability to present a notebook as source code with textual cell definitions and manipulate cells as regular code.

    • Live preview of the cell execution output and Markdown content.

    • Auto-saving changes that you make in your files. Saving is triggered by various events, for example, closing a file or a project, or quitting the IDE.

  • Coding assistance:

    • Error and syntax highlighting.

    • Code completion.

    • Ability to create line comments Ctrl+/.

  • Ability to run cells and preview execution results.

  • Dedicated Jupyter Notebook Debugger.

  • Shortcuts for basic operations with Jupyter notebooks.

  • Ability to recognize .ipynb files and mark them with the ipynb file icon icon.

Quick start with the Jupyter notebook in JetBrains DataSpell

To start working with Jupyter notebooks in JetBrains DataSpell:

  1. Open files in your working space.

  2. If needed, configure or create a new virtual environment.

  3. Add and edit source cells.

  4. Execute any of the code cells to launch the Jupyter server.

Get familiar with the user interface

Mind the following user interface features when working with Jupyter notebooks in JetBrains DataSpell.

Notebook editor

Overview of the editor UI

A Jupyter notebook opened in the editor has its specific UI elements:

  • Jupyter notebook toolbar: provides quick access to the most popular actions. The rest of the notebook specific actions are available in the Cell menu.

  • Code cell: a notebook cell that contains an executable code

  • Cell output: results of the code cell execution; can be presented by a text output, table, or plot.

  • Cell toolbar: a toolbar of the code cell with the most popular commands. By default, cell toolbars are disabled. To enable them, open project settings/preferences (Ctrl+Alt+S ), go to Jupyter, and select the Show cell toolbar checkbox.

Cell toolbar

Each code cell has its configurable toolbar so that you can easily access the most popular commands and actions.

Toolbar elementDescription
Run cellExecutes the code cell. You can also press Ctrl+Enter to run the code cell.
Run cell and select belowExecutes this cell and select the cell below. Press Shift+Enter to call the same action.
Run and insert belowExecutes this cell and insert a new cell below.
Move cell upMoves the current cell up
Move cell downMoves the current cell down
More options

Open the list of additional call actions:

  • Run all above: Executes all cell the preceded the selected cell.

  • Debug cell: Runs the Debugger for the current cell. You should set the breakpoint first. Just click the gutter next the line to want to stop at.

  • Merge Cell Above: Merges the current cell with the cell above.

  • Merge Cell Below: Merges the current cell with the cell below.

  • Split Cell: Splits the current cell by the selected code line.

  • Convert Cell to Code: Converts the current cell into a code cell.

  • Convert Cell to Markdown: Converts the current cell into a Markdown cell.

  • Delete cell: Deletes the current cell.

Notebook toolbar

The Jupyter notebook toolbar provides quick access to all basic operations with notebooks:

Jupyter toolbar
Toolbar elementDescription
new cellAdd a code cell below the selected cell.
Move cell upMoves the current cell up
Move cell downMoves the current cell down
Run cell and select belowExecutes this cell and select the cell below. Press Shift+Enter to call the same action.
Interrupt kernelClick this icon if you want to interrupt any cell execution.
Restart the kernelClick this icon to restart the currently running kernel
Run all cellsExecutes all cells in the notebook.
Cell typeYou can select a cell type from this list and change the type for the selected cell.
remove the cellDeletes the current cell.
List of Jupyter serversThe Jupyter Server widget that shows the currently used Jupyter server. Click the widget and select Configure Jupyter Server to setup another local or remote Jupyter server.
List of Jupyter kernelsList of the available Jupyter kernels.
Trusted JS widgetsSelect this checkbox to allow executing JavaScript in your Jupyter notebook.
Move the cell upThis actions moves the current cell up.
Move the cell downThis actions moves the current cell down.
Open notebook in browserYou can preview the notebook in a browser.

Tool windows

The Server Log tab of the Jupyter tool window appears when you have any of the Jupyter server launched. The Server log tab of this window shows the current state of the Jupyter server and the link to the notebook in a browser.

Jupyter server tool window: the Server log tab

It also provides controls to stop the running server (Stop the server) and launch the stopped server (Run the server ).

The Variables tab provides the detailed report about variable values of the executed cell.

Jupyter server tool window: the Variables tab
Last modified: 15 June 2021