Home > Mobile >  Cells not in Numerical sequence in Jupyter Notebook
Cells not in Numerical sequence in Jupyter Notebook

Time:09-01

I have a file in Jupyter notebook but for some reason the cell numbering is not in order (e.g 1,2,3,4).

In my file it starts at 1, then 89, then 44:

Screenshot of file

Does anyone know how to get them in sequential order?

CodePudding user response:

The numbers you are referring to are there to show the order in which your cells have been executed. Consider this example:

If you want these numbers to be in order, by definition it means that you have to execute all your cells in order.

  • If you want them to start from 1, restart your kernel:

or:

  • You can either execute all your cells manually, or click on the button "Run all cells":

Result:

CodePudding user response:

The numbers have no importance. They are the order at which you ran them. As suggested above - do Kernel | Restart and this will reset the numbers.

  • Related