Notebooks (Watson Studio)
A Jupyter notebook is a web-based environment for interactive computing. You can use notebooks to run small pieces of code that process your data, and you can immediately view the results of your computation.
Notebooks include all of the building blocks you need to work with data:
- The data
- The code computations that process the data
- Visualizations of the results
- Text and rich media to enhance understanding
In Watson Studio, you can work with Jupyter notebooks in different tools:
-
Notebook editor: The notebook editor is largely used for interactive, exploratory data analysis programming and data visualization. You should use the notebook editor if you are new to Jupyter notebooks.
When you open a notebook in the notebook editor in edit mode, the notebook is locked while you are editing it so nobody else can edit the notebook at the same time.
While you hold the lock, only you can make changes to the notebook. All other projects users will see the lock icon on the notebook. Only project administrators are able to unlock a locked notebook and open it in edit mode.
When you close the notebook, the lock is released and another user can select to open the notebook in edit mode. Note that you must close the notebook while the runtime environment is still active. The notebook lock can't be released for you if the runtime was stopped or is in idle state. If the notebook lock is not released for you, you can unlock the notebook from the project's Assets page.
-
JupyterLab: JupyterLab offers an IDE-like development interface which includes notebooks. The modular structure of the interface is extensible and open to developers, allowing working with several open notebooks or files in tabs in the same window. JupyterLab is a high-performance, interactive development environment for creating and running Python notebooks. The integration with GIT supports collaboration and file sharing.
Working in the notebook editor
In the IBM Watson Studio notebook editor, you can create Python, Scala, and R notebooks to analyze your data.
Required service
None
Data size 5 GB. If your files are larger, you must load the data in multiple parts.
Working in JupyterLab
In JupyterLab, you can create Python notebooks to analyze your data. To work in JupyterLab, you must associate the project with a Git repository and select to edit notebooks with the JuypterLab IDE.
Required service
None
Data format
Code support for loading and accessing data in data assets that have been added to the project from:
CSV and JSON
Tables in all variants of IBM Db2, PostgreSQ, Microsoft SQL Server and many other popular database systems
Notebook UI

Code computations can build upon each other to quickly unlock key insights from your data. Notebooks record how you worked with data, so you can understand exactly what was done, reproduce computations reliably, and share your findings with others.
If you want to work on more than one notebook at the same time, you can open multiple notebooks on separate browser tabs. To open multiple notebooks, right-click the edit button and select open in a new tab. You can also collaborate with others on your notebooks, add comments, and view a history of your notebooks.
Promoting notebooks to spaces
If you have saved a notebook version to your project, you can promote it to a deployment space, then deploy it and make the URL available to users.
If you created a job for a notebook and you selected Log & updated version as the job run result output, the notebook cannot be promoted to a deployment space.
If you are working with a notebook that you created prior to IBM Cloud Pak for Data 4.0, and you want to promote this notebook to a deployment space, perform the following steps:
-
Save a new version of the notebook.
If the notebook that you created prior to IBM Cloud Pak for Data has a job definition, in addition to saving a new version, you need to edit the job settings:
- Select the newly created version.
- Select either Log & notebook or Log only as the job run result output under Advanced configuration.
- Rerun the job.
You can promote a notebook:
- Manually, from the Assets page of your project by selecting the notebook and clicking Promote from the Actions menu (
). -
Programmatically by using CPDCTL commands to promote and run the notebook in a job in a deployment space. See Promote notebook CLI command reference.
To learn how to use CPDCTL to promote notebooks to spaces, refer to CPDCTL Samples for Notebooks and Environments in Spaces.
Note that the environment that was used to run the notebook is not promoted with the notebook, irrespective of how you promote the notebook. You must select an appropriate environment when you create a job to run the notebook in the space.