Hiding sensitive code cells in a notebook

If your notebook includes code cells with sensitive data, such as credentials for data sources, you can hide those code cells from anyone you share your notebook with. Project collaborators can see hidden cells.

To hide code cells:

  1. Open the notebook and select the code cell to hide.
  2. Insert a comment with the hide tag on the first line of the code cell.

    For the Python, R, and Scala languages, enter the following syntax: # @hidden_cell

syntax for hiding code cells