Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Project Juypter In / Out Bracket Notation

Writer Emily Wong

I'm trying to learn how project Juypter works (formerly IPython Notebook) I've very confused by the cell identifier's In[] and Out[] I understand In = an input cell and Out = an output cell, but I'm baffled by the significance of the number within the brackets. What does that signify? It seem very prominent in the output, and I'm really baffled why I can't find any documentation on what that represents, and why it's there. I've been searching for the past hour.

Search terms: "ipython notebook in out bracket notation indexes" and variations combinations of those words. I've been thru numerous tutorials as well as the documentation at: and at . I'm drawing a total blank.

What does the cell notation In[7] and Out[7] signify. Why are those numbers there?

1

1 Answer

The numbers after In and Out are the execution counts associated with the cells: the first cell executed gets 1, the second 2, and so on:

Execution counter (prompt number)

The kernel should have a single, monotonically increasing counter of all execution requests that are made with store_history=True. This counter is used to populate the In[n] and Out[n] prompts. The value of this counter will be returned as the execution_count field of all execute_reply and execute_input messages.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy