Skip to content Skip to sidebar Skip to footer

Python Spyder: Show All Colums Of A Pandas-dataframe In ".describe()"

I am stuck here, but I it's a two part question. Looking at the output of .describe(include = 'all'), not all columns are showing; how do I get all columns to show? This is a commo

Solution 1:

Solution

You could use either of the following methods:

Method-1:

source

pd.options.display.max_columns = None

Method-2:

source

pd.set_option('display.max_columns', None)

# to reset this
pd.reset_option('display.max_columns')

Method-3:

source

# assuming df is your dataframe
pd.set_option('display.max_columns', df.columns.size)

# to reset this
pd.reset_option('display.max_columns')

Method-4:

source

# assuming df is your dataframe
pd.set_option('max_columns', df.columns.size)

# to reset this
pd.reset_option('max_columns')

To not wrap the output into multiple lines do this

source

pd.set_option('display.expand_frame_repr', False)

References

I will recommend you to explore the following resources for more details and examples.

  1. How to show all of columns name on pandas dataframe?

  2. How do I expand the output display to see more columns of a pandas DataFrame?

  3. How to show all columns / rows of a Pandas Dataframe?

Post a Comment for "Python Spyder: Show All Colums Of A Pandas-dataframe In ".describe()""