Using a Code Cell

Write & Run Code in a Notebook.

circle-info

Check out the given walk-through on how to use a Code Cell under a Notebook.

Using a code cell under a Notebook

You can write and execute code using the Notebook interface. This section covers the steps to write and run a sample code in the Code cell of the BDB DSL Notebook.

circle-info

Please Note: A Code cell gets added by default while creating a new Notebook.

  • Create a new Notebook and open it.

  • A cell to write and execute code opens under the selected Notebook by default.

By default a Code gets added to a new Notebook
  • Write code inside the cell.

  • Click the Run cell icon to run the code.

Use the Code cell to write a code
circle-info

Please Note: The Code cells also get code from the selected Notebook operations by using the right-side panel and selecting a specific option. E.g., the following image displays how the code for an available Dataset gets inserted while selecting the dataset.

  • The Run cell button gets changed into the Interrupt cell icon while running the code.

  • Another code cell gets added below (as shown in the following image).

While running the first cell one more cell gets added
  • Once the code has run successfully a checkmark appears below the Run cell icon.

When code gets run successfully
  • Click the Save icon provided for the Notebook.

  • A notification message appears to indicate the completion of the action.

Saving a Notebook
  • The Notebook status gets changed as saved and the new updates get saved in it.

For a saved Notebook Status gets changed as Saved
circle-info

Please Note:

  • The +Code and +Markdown options provided at the bottom of a cell inserts a new cell after the given code/ Markdown cell.

  • While the Code and Markdown options provided under the Code section of the Task Bar adds a new cell before the given code/Markdown cell.

  • Refer the Data Science Lab Quick Start Flow page to get an overview of the Data Science Lab module in nutshell. Click herearrow-up-right to get redirected to the quick start flow page.

​​​

Last updated