IPython Notebook cell multiple outputs

An easier way:

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

It saves you having to repeatedly type "Display"

Say the cell contains this:

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

a = 1
b = 2

a
b

Then the output will be:

Out[1]: 1
Out[1]: 2

If we use IPython.display.display:

from IPython.display import display

a = 1
b = 2

display(a)
display(b)

The output is:

1
2

So the same thing, but without the Out[n] part.


have you tried the display command?

from IPython.display import display
display(salaries.head())
display(teams.head())