I'm using IPython web notebook and there's a prompt number before each block such as "In [68]:". What's the purpose of this prompt number? Can you do anything with it? Can/should you ever reset it?
IPython caches inputs and outputs, so you can reference and reuse the input or output of each cell. The prompt numbers correspond to the indices for accessing these objects.
So you can do things like:
a = Out[5]
to reuse the output of a cell.
See the relevant docs for details.
The prompt count will be reset if/when you restart the kernel, because these caches will no longer exist.
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