Permanently Set Pandas Print Display Options Output

Опубликовано: 07 Июль 2019
на канале: Jarad Python
3,945
32

Pandas doesn't print all columns by default. If you want to permanently set Pandas print options to display the output of all columns, you can use any of these options for a TEMPORARY solution:

import pandas as pd
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
#OR
pd.set_option('display.expand_frame_repr', False)
#OR
pd.set_option('max_colwidth', 800)

But this is just temporary. If you do this a lot (like I do), you can set Pandas print options to show the output permanently by going to your Python install:

Ex: Python##\Lib\site-packages\pandas\core\config_init.py

In config_init.py, you will find where all these Pandas DataFrame print options are for showing all columns, outputting max rows, and many other settings you can change.

Helpful links
https://stackoverflow.com/questions/1...

#Python #Pandas #DataFrames