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?
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.
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.
have you tried the display
command?
from IPython.display import display display(salaries.head()) display(teams.head())
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