Expand IPython Console output

735 views
Skip to first unread message

Chad Sellers

unread,
Aug 30, 2022, 11:59:35 AM8/30/22
to spyder
Hi, 

I'm trying to expand simple output in my console. I'm using Spyder as my IDE for basic python dev - pivot tables and other date mining exercises. I'm getting frustrated when I cannot get my output to fully expand in the IPython console. When the data that I am retrieving is longer than a few lines it gets cut off. How do I fix this to show the entirety of the results?

Any help is appreciated!!


Thanks, 
Chad

Daniel Althviz Moré

unread,
Aug 31, 2022, 1:53:39 PM8/31/22
to spyder
Hi Chad,

Could you share a simple code example to replicate this? Maybe you can change the 'Buffer' option value from the IPython Console preferences and see if that helps ('Preferences > IPython Console > Display > Source code > Buffer'). Let us know if changing that option value helps!

Best regards,

Daniel

Evan Groopman

unread,
Aug 31, 2022, 9:05:04 PM8/31/22
to spyd...@googlegroups.com
If you are using pandas, for example, you can use an option context to temporarily display all rows and columns of the dataframe (https://stackoverflow.com/questions/11707586/how-do-i-expand-the-output-display-to-see-more-columns-of-a-pandas-dataframe):

with pd.option_context('display.max_rows', None, 'display.max_columns', None):
    print (df)
Or you can set it permanently.

Spyder also has a Variable Explorer tab if you assign whatever output you want to a variable. Double-clicking on the variable will expand a popup allowing you to scroll through all of the values.

Of course, the exact utility of these options depends on your data dimensionality and class (e.g., array, dataframe, dict, etc.).

image.png
image.png


--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/758df682-4843-449a-b873-758e7e528213n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages