Project Juypter in / out Bracket Notation

Project Juypter in / out Bracket Notation

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

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

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.