Get startedGet started for free

Getting things in order

In DataLab, the sequence in which cells are run is crucial. Each cell depends on the variables and outputs generated by previous cells. Running cells out of order can lead to unexpected results or errors.

In this exercise, you’ll experiment with executing cells in different orders to see how it affects the output.

This exercise is part of the course

Introduction to DataLab

View Course

Exercise instructions

  • Execute all cells in the notebook using the Run All button, observing the outputs.
  • Press run on each cell in different orders, again observing the outputs.
  • Alternate between the cell labeled as 'Step 2' in the comments and the cell labeled as 'Step 3' a few times, before running the cells labeled 'Step 4' & 'Step 5'.'
  • Order the cells so the cell labeled 'Step 3' comes after 'Step 2' and hit Run All to check everything works.

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise