Need help displaying complete output in Jupyter rather than just last result set in Python

0 votes

Hi all,

I have a simple question. My requirement is that I want Jupyter to basically output all of the interactive output to the user. 

This has to be done without using print statements and not just the last recent result obtained.

How can this be done?

Check out the following example for better clarity:


The output I want for this particular sequence of code is as follows:


How can I go about doing this? All help appreciated!

Jan 28 in Python by Anirudh
• 2,070 points

1 answer to this question.

0 votes

Hi, the solution to this is very simple.

Check out the following piece of code for some clarity:

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

So we are making use of the interactive shell and turning the flag to be all. This basically does what you exactly want.

Hope this helped!

answered Jan 28 by Nymeria
• 3,520 points

Related Questions In Python

0 votes
1 answer
0 votes
1 answer

Need help to open excel file and read in Python

You can use pandas module to do ...READ MORE

answered Jul 22 in Python by Tina
+3 votes
2 answers

how to print array integer without [] bracket in python like result = 1,2,3,4,5

Hey @abhijmr.143, you can print array integers ...READ MORE

answered Aug 4, 2018 in Python by Omkar
• 67,660 points

edited Aug 8, 2018 by Omkar 1,198 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Need help with making use of Pluck in Python

Hi, good question. Easy solution to be ...READ MORE

answered Jan 24 in Python by Nymeria
• 3,520 points
0 votes
1 answer

Need help installing easy_install in Python 2.7.1 on Windows 7

That tool is part of the setuptools ...READ MORE

answered Dec 26, 2018 in Python by Nymeria
• 3,520 points
0 votes
1 answer

Need help extracting a schema to make use for an avro file in Python

Hi, nice question. So what I daily use ...READ MORE

answered Jan 10 in Python by Nymeria
• 3,520 points