Links

Hiding and showing cells

In both the DataCamp Notebook editor as well as JupyterLab, you can hide and show the code and/or output of one or all cells in a notebook. This allows you to pull the attention towards the insights that matter, keeping all of your data cleaning and theming plumbing out of sight.

DataCamp Notebook Editor

Different ways to hide/show code or output in one or more cells
  • To hide the code of a cell hover over the cell and select "Hide code" in the cell menu.
  • To show the code of a cell click on "Show hidden code" or hover over the cell and select "Show code" in the cell menu.
  • To hide the code of all cells in a notebook, click on the 'eye' icon next to the Run all button and select "Hide all code".
  • To show the code of all cells in a notebook, click on the 'eye' icon next to the Run all button and select "Hide all code".

JupyterLab

You can control which parts of which cells (single cells, selected cells or all cells) are shown or hidden through the "View" menu in the toolbar.
Collapsing and expanding code and output of cells in JupyterLab

Interoperability

If you use the DataCamp Notebook editor to hide the code or output of a cell, this part of a cell will also be hidden in the JupyterLab editor and vice versa.

How this affects publishing

The code and output of a cell that you hide in either the DataCamp Notebook editor or JupyterLab will not be visible in your publication.