How can I stop a particular cell from running in google colab?
If you have a multi-cell file running and you need to stop a particular cell from running. Follow this:
Select the code from the google colab cell of interest.
Use ctrl + x to cut the code from the cell (or copy). Delete the cell (this stops the code from executing).
Now, create a new cell and paste the code you just copied.
Press the stop button, or select the 'Interrupt execution' item from the Runtime menu.
Keep in mind that some code cannot be interrupted. (For example, if you're using a C library stuck in a syscall.) In these cases, you can restart your Python process by selecting 'Restart runtime...' from the Runtime menu.