0 / 0
Notebooks and scripts
Last updated: Oct 09, 2024
Notebooks and scripts

You can create, edit and execute Python and R code using Jupyter notebooks and scripts in code editors, for example the notebook editor or an integrated development environment (IDE), like RStudio.

Notebooks
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, namely the data, the code computations that process the data, the visualizations of the results, and text and rich media to enhance understanding.
Scripts
A script is a file containing a set of commands and comments. The script can be saved and used later to re-execute the saved commands. Unlike in a notebook, the commands in a script can only be executed in a linear fashion.

Notebooks

Required permissions
Editor or Admin role in a project
Tools
Notebook editor
Programming languages
Python and R
Data format
All types
Code support is available for loading and accessing data from project assets for:
Data assets, such as CSV, JSON and .xlsx and .xls files
Database connections and connected data assets

See Data load support for the supported file and database types.

Data size
5 GB. If your files are larger, you must load the data in multiple parts.

Scripts

Required permissions
Editor or Admin role in a project
Tools
RStudio
Programming languages
R
Data format
All types
Code support is available for loading and accessing data from project assets for:
Data assets, such as CSV, JSON and .xlsx and .xls files
Database connections and connected data assets

See Data load support for the supported file and database types.

Data size
5 GB. If your files are larger, you must load the data in multiple parts.

Working in the notebook editor

The notebook editor is largely used for interactive, exploratory data analysis programming and data visualization. Only one person can edit a notebook at a time. All other users can access opened notebooks in view mode only, while they are locked.

You can use the preinstalled open source libraries that come with the notebook runtime environments, add your own libraries, and benefit from the IBM libraries provided at no extra cost.

When your notebooks are ready, you can create jobs to run the notebooks directly from the notebook editor. Your job configurations can use environment variables that are passed to the notebooks with different values when the notebooks run.

Working in RStudio

RStudio is an integrated development environment for working with R scripts or Shiny apps. Although the RStudio IDE cannot be started in a Spark with R environment runtime, you can use Spark in your R scripts and Shiny apps by accessing Spark kernels programmatically.

R scripts and Shiny apps can only be created and used in the RStudio IDE. You can't create jobs for R scripts or R Shiny deployments.

Learn more

Parent topic: Analyzing data and building models

Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more