Peter
Peter

Reputation: 441

Does ipython notebook 'run all cells' execute simultaneously or in sequence?

I have a code that is applying changes to a dataset and then the next cell picks this up to continue with an other set of changes. This is done for my own readability and troubleshooting in datamunging.

I think I finished the code and want to apply it to the initial data. Ipython notebook has an option run all cells.

My question is does it run them one after another or simultaneously ?

Upvotes: 5

Views: 5830

Answers (2)

Ami Tavory
Ami Tavory

Reputation: 76386

It is very easy to see that it runs the cells sequentially. Simply change one cell to have something like

i = 39882

and in the following cell place

print i

If the cells would run concurrently, the latter cell would not print the value modified in the previous cell.

Upvotes: 6

François
François

Reputation: 133

It runs in sequence. You will actually see the progress as the cells that are in queue will show a star In [*]:, while the cells that have successfully will show some number, ex.: In [123].

Upvotes: 9

Related Questions