Python Forum
Pandas dataframe columns collapsed in Spyder when printing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pandas dataframe columns collapsed in Spyder when printing
#3
(Nov-02-2019, 06:33 PM)jefsummers Wrote: This may or may not work for you.
pd.set_option("display.max_columns",200)
it will display up to 200 columns. However, it will do so by displaying them in groups, stacked on each other.

Thank you so much, this did the trick! This method surely will be most useful for me in my tasks Cool

Thank you for your assistance Big Grin

EDIT: I noticed that in some cases this method doesn't quite work as intended (like you implied) Tongue I was lucky with my first attempt and in that case my dataframe was presented nicely. However, my other dataframes look kind of messy with this setting. So I guess you are right, it is not a "general solution". But is surely is helpful to know about this method as it may actually be the right solution in some cases Tongue

For this project, I guess I will just stick with tkinter and view the full sheet Shy
Reply


Messages In This Thread
RE: Pandas dataframe columns collapsed in Spyder when printing - by UniKlixX - Nov-04-2019, 07:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to add columns to polars dataframe sayyedkamran 1 1,756 Nov-03-2023, 03:01 PM
Last Post: gulshan212
  concat 3 columns of dataframe to one column flash77 2 836 Oct-03-2023, 09:29 PM
Last Post: flash77
  HTML Decoder pandas dataframe column mbrown009 3 1,017 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Use pandas to obtain cartesian product between a dataframe of int and equations? haihal 0 1,111 Jan-06-2023, 10:53 PM
Last Post: haihal
  Pandas Dataframe Filtering based on rows mvdlm 0 1,428 Apr-02-2022, 06:39 PM
Last Post: mvdlm
  Pandas dataframe: calculate metrics by year mcva 1 2,306 Mar-02-2022, 08:22 AM
Last Post: mcva
  Pandas dataframe comparing anto5 0 1,257 Jan-30-2022, 10:21 AM
Last Post: anto5
  PANDAS: DataFrame | Replace and others questions moduki1 2 1,792 Jan-10-2022, 07:19 PM
Last Post: moduki1
  PANDAS: DataFrame | Saving the wrong value moduki1 0 1,545 Jan-10-2022, 04:42 PM
Last Post: moduki1
  update values in one dataframe based on another dataframe - Pandas iliasb 2 9,229 Aug-14-2021, 12:38 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020