# Create and edit Jupyter notebooks

> **Warning:**
> The following is only valid when the Python and Jupyter plugins are [installed and enabled](managing-plugins.html)!

Procedure: Set up your project

1. In IntelliJ IDEA, create a new [Python project](creating-empty-python-project.html)  .

2. [Install](https://www.jetbrains.com.cn/en-us/help/pycharm/installing-uninstalling-and-upgrading-packages.html)  the jupyter package for the selected interpreter.

3. When all the project analysis processes are finished, you are ready to start working with the notebook files.

## Create and open Jupyter notebooks

To open an existing `.ipynb` file, follow the  same steps as for the files of the other types. If needed, you can create a notebook file.

Procedure: Create a notebook file

1. Do one of the following:

* Right-click the target directory in the Project tool window and select New from the context menu.

* Press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Alt+Insert` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Alt+Insert` (Visual Studio), `⌘ ⌃ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS))

2. Select Jupyter Notebook .

3. In the dialog that opens, type a filename.

A notebook file has the `*.ipynb` extension and is marked with the corresponding icon ![Jupyter](https://resources.jetbrains.com.cn/help/img/idea/2026.2/python-jupyter.icons.org.jetbrains.plugins.notebooks.jupyter.expui.jupyterNotebook.svg).

Procedure: Convert a Python file to a Jupyter notebook

1. Right-click the file in the `Project` tool window.

2. Select `Convert to Jupyter Notebook` from the context menu.

Procedure: Convert a Jupyter notebook to a Python file

1. Right-click the file in the `Project` tool window.

2. Select `Convert to Python File` from the context menu.

Procedure: Export Jupyter notebooks

You can export Jupyter notebooks to various formats:

1. Right-click the Jupyter notebook file in the Project tool window.

2. Select `Export Notebook As` and then select the format from the list.

![Export a Jupyter notebook file](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_export_ipynb.png)

## Edit Jupyter notebooks

You can apply various editing actions to one cell or to the entire notebook. Press the `Ctrl+A` (Windows), `⌘ A` (macOS), `⌘ A` (IntelliJ IDEA Classic (macOS)), `⌘ A` (macOS System Shortcuts), `Ctrl+A` (XWin), `Ctrl+A` (GNOME), `Ctrl+A` (KDE), `Ctrl+X, H` (Emacs), `Ctrl+A` (Sublime Text), `⌘ A` (Sublime Text (macOS)), `Ctrl+A` (NetBeans), `Ctrl+A` (Visual Studio), `⌘ A` (Visual Studio (macOS)), `Ctrl+A` (Eclipse), `⌘ A` (Eclipse (macOS)) once to select a cell at the caret and press `Ctrl+A` (Windows), `⌘ A` (macOS), `⌘ A` (IntelliJ IDEA Classic (macOS)), `⌘ A` (macOS System Shortcuts), `Ctrl+A` (XWin), `Ctrl+A` (GNOME), `Ctrl+A` (KDE), `Ctrl+X, H` (Emacs), `Ctrl+A` (Sublime Text), `⌘ A` (Sublime Text (macOS)), `Ctrl+A` (NetBeans), `Ctrl+A` (Visual Studio), `⌘ A` (Visual Studio (macOS)), `Ctrl+A` (Eclipse), `⌘ A` (Eclipse (macOS)) twice to select all cells in the notebook.

> **Note:**
> IntelliJ IDEA updates the source code and the preview of the notebook if it has been changed externally.

The editor for Jupyter notebooks has two modes: the edit mode and the command mode. Depending on the mode, you can either edit code in notebook cells or use keyboard shortcuts to perform specific actions with cells.

Procedure: Edit mode

* To toggle the edit mode, press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) or click any cell.

* When a cell is in the edit mode, it has a highlighted line with a caret inside the cell.

![A cell in the edit mode](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_cell_in_edit_mode.png)

* When in the edit mode, you can navigate through all cells line-by-line using `Up` (Windows), `↑` (macOS), `↑` (IntelliJ IDEA Classic (macOS)), `↑` (macOS System Shortcuts), `Up` (XWin), `Up` (GNOME), `Up` (KDE), `Up` (Emacs), `Up` (Sublime Text), `↑` (Sublime Text (macOS)), `Up` (NetBeans), `Up` (Visual Studio), `↑` (Visual Studio (macOS)), `Up` (Eclipse), `↑` (Eclipse (macOS)) and `Down` (Windows), `↓` (macOS), `↓` (IntelliJ IDEA Classic (macOS)), `↓` (macOS System Shortcuts), `Down` (XWin), `Down` (GNOME), `Down` (KDE), `Down` (Emacs), `Down` (Sublime Text), `↓` (Sublime Text (macOS)), `Down` (NetBeans), `Down` (Visual Studio), `↓` (Visual Studio (macOS)), `Down` (Eclipse), `↓` (Eclipse (macOS)) keys.

Procedure: Command mode

* To toggle the command mode, press `Escape` (Windows), `⎋` (macOS), `⎋` (IntelliJ IDEA Classic (macOS)), `⎋` (macOS System Shortcuts), `Escape` (XWin), `Escape` (GNOME), `Escape` (KDE), `Escape, Escape` (Emacs), `Escape` (Sublime Text), `⎋` (Sublime Text (macOS)), `Escape` (NetBeans), `Escape` (Visual Studio), `⎋` (Visual Studio (macOS)), `Escape` (Eclipse), `⎋` (Eclipse (macOS)) or click the gutter.

* When in the command mode, you can navigate the notebook cell by cell using `Up` (Windows), `↑` (macOS), `↑` (IntelliJ IDEA Classic (macOS)), `↑` (macOS System Shortcuts), `Up` (XWin), `Up` (GNOME), `Up` (KDE), `Up` (Emacs), `Up` (Sublime Text), `↑` (Sublime Text (macOS)), `Up` (NetBeans), `Up` (Visual Studio), `↑` (Visual Studio (macOS)), `Up` (Eclipse), `↑` (Eclipse (macOS)) and `Down` (Windows), `↓` (macOS), `↓` (IntelliJ IDEA Classic (macOS)), `↓` (macOS System Shortcuts), `Down` (XWin), `Down` (GNOME), `Down` (KDE), `Down` (Emacs), `Down` (Sublime Text), `↓` (Sublime Text (macOS)), `Down` (NetBeans), `Down` (Visual Studio), `↓` (Visual Studio (macOS)), `Down` (Eclipse), `↓` (Eclipse (macOS)) keys, as well as use keyboard shortcuts to [select](#cell-selection), [copy](#copy-paste), [paste](#copy-paste), and [delete](#delete_cell) cells.

Procedure: Edit cells

* A newly created notebook contains one code cell. To change its type, right-click the cell and select Convert Cell to Markdown from the context menu.

* To edit a code cell, just click it.

* To edit a Markdown cell, double-click it or press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) and start typing. To preview the output, press `Shift+Enter` (Windows), `⇧ ⏎` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⇧ ⏎` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Ctrl+Enter` (Sublime Text), `⌘ ⏎` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⇧ ⏎` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⇧ ⏎` (Eclipse (macOS)).

Procedure: Markdown cell toolbar

1. After you select the part of the text in the Markdown cell, the toolbar appears.

![Markdown cell toolbar](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown_cell_toolbar_py.png)

2. You can use it to apply the following formatting options:

| Item | Icon | Shortcut | Description |
| --- | --- | --- | --- |
| Text style |  |  | Click the dropdown to change text formatting to various heading levels. |
| Bold text | ![Bold text](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown.icons.editor_actions.Bold.svg) | `Ctrl+B` (Windows), `⌘ B` (macOS), `⌘ B` (IntelliJ IDEA Classic (macOS)), `⌘ B` (macOS System Shortcuts), `Ctrl+B` (XWin), `Ctrl+B` (GNOME), `Ctrl+B` (KDE), `Ctrl+B` (Emacs), `Ctrl+B` (Sublime Text), `⌘ B` (Sublime Text (macOS)), `Ctrl+B` (NetBeans), `Ctrl+B` (Visual Studio), `⌘ B` (Visual Studio (macOS)), `Ctrl+B` (Eclipse), `⌘ B` (Eclipse (macOS)) | Makes the selected text bold (`**text**`). |
| Italic text | ![Italic text](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown.icons.editor_actions.Italic.svg) | `Ctrl+I` (Windows), `⌘ I` (macOS), `⌘ I` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Ctrl+I` (XWin), `Ctrl+I` (GNOME), `Ctrl+I` (KDE), `Ctrl+I` (Emacs), `Ctrl+I` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+I` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Ctrl+I` (Eclipse), `⌘ I` (Eclipse (macOS)) | Makes the selected text italic (`_text_`). |
| Strike through | ![Strike through](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown.icons.editor_actions.Strike_through.svg) | `Ctrl+I` (Windows), `⌘ I` (macOS), `⌘ I` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Ctrl+I` (XWin), `Ctrl+I` (GNOME), `Ctrl+I` (KDE), `Ctrl+I` (Emacs), `Ctrl+I` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Ctrl+I` (NetBeans), `Ctrl+I` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Ctrl+I` (Eclipse), `⌘ I` (Eclipse (macOS)) | Strikes through the selected text. (`~~text~~`). |
| Code | ![Code](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown.icons.editor_actions.Code_span.svg) | `Ctrl+Shift+C` (Windows), `⌘ ⇧ C` (macOS), `⌘ ⇧ C` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ C` (macOS System Shortcuts), `Ctrl+Shift+C` (XWin), `Ctrl+Shift+C` (GNOME), `Ctrl+Shift+C` (KDE), `Ctrl+Shift+C` (Emacs), `Ctrl+Shift+C` (Sublime Text), `⌘ ⇧ C` (Sublime Text (macOS)), `Ctrl+Shift+C` (NetBeans), `Ctrl+Shift+C` (Visual Studio), `⌘ ⇧ C` (Visual Studio (macOS)), `Ctrl+Shift+C` (Eclipse), `⌘ ⇧ C` (Eclipse (macOS)) | Formats text as inline code. |
| Create link | ![Create link](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown.icons.editor_actions.Link.svg) | `Ctrl+Shift+U` (Windows), `⌘ ⇧ U` (macOS), `⌘ ⇧ U` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ U` (macOS System Shortcuts), `Ctrl+Shift+U` (XWin), `Ctrl+Shift+U` (GNOME), `Ctrl+Shift+U` (KDE), `Ctrl+Shift+U` (Emacs), `Ctrl+Shift+U` (Sublime Text), `⌘ ⇧ U` (Sublime Text (macOS)), `Ctrl+Shift+U` (NetBeans), `Ctrl+Shift+U` (Visual Studio), `⌘ ⇧ U` (Visual Studio (macOS)), `Ctrl+Shift+U` (Eclipse), `⌘ ⇧ U` (Eclipse (macOS)) | Adds a hyperlink. |
| Unordered list | ![Unordered list](https://resources.jetbrains.com.cn/help/img/idea/2026.2/markdown.icons.editor_actions.bulletList.svg) |  |  Creates a list. You can choose one of the following types:     * Unordered list    * Ordered list    * Checkmark list    |

## Work with notebook cells

Procedure: Add cells

* To add a code cell above the selected cell:

* In the [command mode](#command-mode), press `A` (Windows), `A` (macOS), `A` (IntelliJ IDEA Classic (macOS)), `A` (macOS System Shortcuts), `A` (XWin), `A` (GNOME), `A` (KDE), `A` (Emacs), `A` (Sublime Text), `A` (Sublime Text (macOS)), `A` (NetBeans), `A` (Visual Studio), `A` (Visual Studio (macOS)), `A` (Eclipse), `A` (Eclipse (macOS)).

* To add a code cell below the selected cell:

* In the [command mode](#command-mode), press `Ctrl+Enter` (Windows), `⌘ ⏎` (macOS), `⌘ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ ⏎` (macOS System Shortcuts), `Ctrl+Enter` (XWin), `Ctrl+Enter` (GNOME), `Ctrl+Enter` (KDE), `Ctrl+Enter` (Emacs), `Ctrl+Enter` (Sublime Text), `⌘ ⏎` (Sublime Text (macOS)), `Ctrl+Enter` (NetBeans), `Ctrl+Enter` (Visual Studio), `⌘ ⏎` (Visual Studio (macOS)), `Ctrl+Enter` (Eclipse), `⌘ ⏎` (Eclipse (macOS)).

* Click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) `Code` on the notebook toolbar.

![Adding a notebook cell](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_add_cell.png)

* Use the popup between cells to add `code`, `Markdown`, `SQL` or `AI` cells to your notebook:

![Popup between Jupyter notebook cells](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_notebook_popup.png)

The popup will automatically appear if you hover between two cells in the notebook.

Procedure: Navigate between sections

In Jupyter notebooks, a section is defined by a Markdown cell that starts with a heading.

Place the caret in a cell and press `Ctrl+Alt+Down` (Windows), `⌘ ⌥ ↓` (macOS), `⌘ ⌥ ↓` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ↓` (macOS System Shortcuts), `Ctrl+Alt+Down` (XWin), `Alt+Shift+Down` (GNOME), `Ctrl+Alt+Down` (KDE), `Ctrl+Alt+Down` (Emacs), `Ctrl+Alt+Down` (Sublime Text), `Ctrl+Alt+Down` (Sublime Text (macOS)), `Ctrl+Alt+Down` (NetBeans), `Ctrl+Alt+Down` (Visual Studio), `⌘ ⌥ ↓` (Visual Studio (macOS)), `Ctrl+Alt+Down` (Eclipse), `Ctrl+Alt+Down` (Eclipse (macOS)) or `Ctrl+Alt+Up` (Windows), `⌘ ⌥ ↑` (macOS), `⌘ ⌥ ↑` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ↑` (macOS System Shortcuts), `Ctrl+Alt+Up` (XWin), `Alt+Shift+Up` (GNOME), `Ctrl+Alt+Up` (KDE), `Ctrl+Alt+Up` (Emacs), `Ctrl+Alt+Up` (Sublime Text), `Ctrl+Alt+Up` (Sublime Text (macOS)), `Ctrl+Alt+Up` (NetBeans), `Ctrl+Alt+Up` (Visual Studio), `⌘ ⌥ ↑` (Visual Studio (macOS)), `Ctrl+Alt+Up` (Eclipse), `Ctrl+Alt+Up` (Eclipse (macOS)) to jump to the next or previous Markdown cell that defines a section.

Procedure: Select cells

* To select a cell, click the gutter next to the cell.

* To select several cells:

* Click the gutter next to cells while holding `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (NetBeans), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (Eclipse), `Shift` (Eclipse (macOS)) for a series of consecutive cells, or `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (NetBeans), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS)) for non-consecutive cells.

* In the command mode, hold `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (NetBeans), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (Eclipse), `Shift` (Eclipse (macOS)) and press the `Up` (Windows), `↑` (macOS), `↑` (IntelliJ IDEA Classic (macOS)), `↑` (macOS System Shortcuts), `Up` (XWin), `Up` (GNOME), `Up` (KDE), `Up` (Emacs), `Up` (Sublime Text), `↑` (Sublime Text (macOS)), `Up` (NetBeans), `Up` (Visual Studio), `↑` (Visual Studio (macOS)), `Up` (Eclipse), `↑` (Eclipse (macOS)) and `Down` (Windows), `↓` (macOS), `↓` (IntelliJ IDEA Classic (macOS)), `↓` (macOS System Shortcuts), `Down` (XWin), `Down` (GNOME), `Down` (KDE), `Down` (Emacs), `Down` (Sublime Text), `↓` (Sublime Text (macOS)), `Down` (NetBeans), `Down` (Visual Studio), `↓` (Visual Studio (macOS)), `Down` (Eclipse), `↓` (Eclipse (macOS)) keys.

You can [execute](running-jupyter-notebook-cells.html#execute-cell), [copy](#copy-paste), [merge](#split-merge), [expand](#expand-collapse),  and [delete](#delete_cell) the selected cells.

Procedure: Drag and drop cells

To rearrange your notebook cells:

1. Click and hold the cell handle in the gutter next to the cell.

![Cell handle](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_notebook_drag_cell.png)

2. Drag the cell to the required position and release the mouse button to drop it in the highlighted area.

Procedure: Copy and paste cells

* To copy a cell in the [command mode](#command-mode), press `Ctrl+C` (Windows), `⌘ C` (macOS), `⌘ C` (IntelliJ IDEA Classic (macOS)), `⌘ C` (macOS System Shortcuts), `Ctrl+C` (XWin), `Ctrl+C` (GNOME), `Ctrl+C` (KDE), `Ctrl+Insert` (Emacs), `Ctrl+C` (Sublime Text), `⌘ C` (Sublime Text (macOS)), `Ctrl+C` (NetBeans), `Ctrl+C` (Visual Studio), `⌘ C` (Visual Studio (macOS)), `Ctrl+C` (Eclipse), `⌘ C` (Eclipse (macOS)) , `C` (Windows), `C` (macOS), `C` (IntelliJ IDEA Classic (macOS)), `C` (macOS System Shortcuts), `C` (XWin), `C` (GNOME), `C` (KDE), `C` (Emacs), `C` (Sublime Text), `C` (Sublime Text (macOS)), `C` (NetBeans), `C` (Visual Studio), `C` (Visual Studio (macOS)), `C` (Eclipse), `C` (Eclipse (macOS)) , or select ![Copy cell](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.copy.svg) Copy Cell in the context menu of the [cell
toolbar](jupyter-notebook-support.html#code-cell-toolbar).

* To paste the copied cell below, press `Ctrl+V` (Windows), `⌘ V` (macOS), `⌘ V` (IntelliJ IDEA Classic (macOS)), `⌘ V` (macOS System Shortcuts), `Ctrl+V` (XWin), `Ctrl+V` (GNOME), `Ctrl+V` (KDE), `Shift+Insert` (Emacs), `Ctrl+Shift+V` (Sublime Text), `⌘ ⇧ V` (Sublime Text (macOS)), `Ctrl+V` (NetBeans), `Ctrl+V` (Visual Studio), `⌘ V` (Visual Studio (macOS)), `Ctrl+V` (Eclipse), `⌘ V` (Eclipse (macOS)) or `V` (Windows), `V` (macOS), `V` (IntelliJ IDEA Classic (macOS)), `V` (macOS System Shortcuts), `V` (XWin), `V` (GNOME), `V` (KDE), `V` (Emacs), `V` (Sublime Text), `V` (Sublime Text (macOS)), `V` (NetBeans), `V` (Visual Studio), `V` (Visual Studio (macOS)), `V` (Eclipse), `V` (Eclipse (macOS)).

* To paste it above the current cell, press `Shift` (Windows), `Shift` (macOS), `Shift` (IntelliJ IDEA Classic (macOS)), `Shift` (macOS System Shortcuts), `Shift` (XWin), `Shift` (GNOME), `Shift` (KDE), `Shift` (Emacs), `Shift` (Sublime Text), `Shift` (Sublime Text (macOS)), `Shift` (NetBeans), `Shift` (Visual Studio), `Shift` (Visual Studio (macOS)), `Shift` (Eclipse), `Shift` (Eclipse (macOS)) with `Ctrl+V` (Windows), `⌘ V` (macOS), `⌘ V` (IntelliJ IDEA Classic (macOS)), `⌘ V` (macOS System Shortcuts), `Ctrl+V` (XWin), `Ctrl+V` (GNOME), `Ctrl+V` (KDE), `Shift+Insert` (Emacs), `Ctrl+Shift+V` (Sublime Text), `⌘ ⇧ V` (Sublime Text (macOS)), `Ctrl+V` (NetBeans), `Ctrl+V` (Visual Studio), `⌘ V` (Visual Studio (macOS)), `Ctrl+V` (Eclipse), `⌘ V` (Eclipse (macOS)) / `Shift+V` (Windows), `Shift+V` (macOS), `Shift+V` (IntelliJ IDEA Classic (macOS)), `Shift+V` (macOS System Shortcuts), `Shift+V` (XWin), `Shift+V` (GNOME), `Shift+V` (KDE), `Shift+V` (Emacs), `Shift+V` (Sublime Text), `Shift+V` (Sublime Text (macOS)), `Shift+V` (NetBeans), `Shift+V` (Visual Studio), `Shift+V` (Visual Studio (macOS)), `Shift+V` (Eclipse), `Shift+V` (Eclipse (macOS)) .

* You can also select the required action from the cell's context menu.

Procedure: Split and merge cells

* To merge a current cell with the cell below, right-click the cell and select the Merge Cell Below command from the context menu.

Similarly, you can merge a cell above the selected cell with the corresponding command.

* To split a cell into two cells, place the caret in the line to break at, then right-click, and select the Split Cell from the context menu.

Procedure: Expand and collapse cells

* Click the cell handle in the gutter next to the cell to expand or collapse it.

Expanded notebook cell:
![Expanded notebook cell](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_notebook_cell_expanded.png)

Collapsed notebook cell:
![Collapsed notebook cell](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_notebook_cell_collapsed.png)

Procedure: Delete cells

* Click ![Delete Cell](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.general.delete.svg) Delete Cell on the [cell toolbar](jupyter-notebook-support.html#code-cell-toolbar).

* Right-click the cell and select `Delete Cell` from the context menu.

Procedure: Add cell tag

You can assign and view tags for each cell right in the notebook editor:

1. Click ![More](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.actions.more.svg) on the cell toolbar.

2. Select Add Cell Tag from the context menu.

![Cell tag added](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_create_cell_tag.png)

3. Enter the tag and click Confirm.

To remove the tag, right-click it and select Remove Tag.

Procedure: Duplicate cells

* To duplicate a cell, click ![More](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.actions.more.svg) on the cell toolbar and select Duplicate Cell Below from the context menu. The new cell will appear directly below the original.

* Right-click the cell and select `Duplicate Cell Below` from the context menu.

Procedure: Use coding assistance

You can edit code cells with the help of Python code insights, such as syntax highlighting and code completion.

* IntelliJ IDEA enables [code completion](auto-completing-code.html)  for the names of classes, functions, and variables. Start typing the name of the code construct, and the suggestion list appears.

Methods and functions:

![Function completion](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_complete_functions.png)

Class variables:

![Class variable completion](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_complete_variable.png)

File paths:

![Path completion](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_complete_path.png)

Packages:

![Package completion](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_complete_package.png)

DataFrame columns:

> **Note:**
> The auto-completion of DataFrame columns names is available in runtime. IntelliJ IDEA will suggest the names for columns only if the cell where the DataFrame is created has already run in the current kernel session.

![DataFrame column name completion](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_complete_dataframe.png)

* Intention actions and quick fixes. You can [add the missing
imports](creating-and-optimizing-imports.html) by using the intention actions.

![Quick-fix for the missing import](https://resources.jetbrains.com.cn/help/img/idea/2026.2/py_ds_quick_fix_import.png)

Note that you can add an import statement to the current cell or to the first cell of the notebook.

Procedure: Customize a color scheme

You can configure Notebooks-aware syntax highlighting according to your preferences and habits.

Procedure:

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Editor | Color Scheme | Jupyter Notebooks`.

2. Select the color scheme, accept the highlighting settings inherited from the defaults or customize them as described in [Colors and fonts](configuring-colors-and-fonts.html).

## See also

### Language and Framework-Specific Guidelines

[Jupyter notebook support](jupyter-notebook-support.html)

