Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPython Notebook cell multiple outputs

I am running this cell in IPython Notebook:

# salaries and teams are Pandas dataframe salaries.head() teams.head() 

The result is that I am only getting the output of teams data-frame rather than of both salaries and teams. If I just run salaries.head() I get the result for salaries data-frame but on running both the statement I just see the output of teams.head(). How can I correct this?

like image 985
Lokesh Avatar asked Dec 21 '15 14:12

Lokesh


People also ask

How do you print multiple items in a Jupyter notebook?

Luckily, there's a Jupyter setting that you can change to print multiple outputs. The ast_node_interactivity setting allows you to choose which results are shown as outputs. By setting it to 'all', every assign and expression will be shown.

Can you run multiple cells at once Jupyter notebook?

First, you will need to install jupyter nbextensions configurator as described here. Then search for "Initialization cells" from inside the search bar of the Jupyter nbextension manager. A check box at the top of every cell will appear. You can select which cells to be marked as initialization cells.


1 Answers

have you tried the display command?

from IPython.display import display display(salaries.head()) display(teams.head()) 
like image 84
tglaria Avatar answered Oct 05 '22 17:10

tglaria