I am using Jupyter Notebook to write some tutorials. However, I met a problem here. As shown in following picture, when I made changes to my colleague's notebook program, the index is not right. how to change those in 1, in [2] to in [34], in [35]?
Click the menu Cell --> Run all . This will execute all cells and you will have ordered cell index numbers. If it does not start from cell index 1 , first click Kernel --> Restart and confirm the re-start.
The easiest way to add line numbers to a Jupyter Notebook is to use the keyboard shortcut, which is Ctrl-m to enter Command Mode, then type L. Just highlight the cell you are interested in adding line numbers to, then hit the keyboard shortcut to toggle the line numbers.
Every code cell has a number, such as 1, or 2. The Notebook labels the cell with its number. The code that will be executed has the label In[ followed by the cell number, meaning Input. If there is a variable on its own at the end, that will generate an Output cell, labeled with Out[ followed by the cell number.
This means that your kernel is busy. If you want to interrupt/stop the execution, go to the menu Kernel and click Interrupt. If it doesn't work, click Restart. You need to go in a new cell and press Shift + Enter to see if it worked.
Click the menu Cell
--> Run all
. This will execute all cells and you will have ordered cell index numbers. If it does not start from cell index 1
, first click Kernel
--> Restart
and confirm the re-start.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With