About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Last updated: Nov 21, 2024
Hide code cells that contain sensitive data, such as credentials for data sources.
Note: When you share a notebook with a link, only collaborators with Editor or Admin role can see the content of code cells that were marked as sensitive. Collaborators with Viewer role can't see this content.
To hide code cells:
-
Open the notebook and select the code cell to hide.
-
Insert a comment with the hide tag on the first line of the code cell.
For the Python and R languages, enter the following syntax:
# @hidden_cell
Parent topic: Sharing notebooks