How to widen output display to see more columns in Pandas dataframe? Read Courses Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report In Python, if there are many more number of columns in the dataframe, then not all the columns will be shown in the output display. So, let’s see how to widen output display to see more columns. Method 1: Using pandas.set_option() function. This function is used to set the value of a specified option. Syntax: pandas.set_option(pat, value) Returns: None Example: Python3 # importing numpy library import numpy as np # importing pandas library import pandas as pd # define a dataframe of # 2 rows and 100 columns # with random entries df = pd.DataFrame(np.random.random(200).reshape(2, 100)) # show the dataframe df Output: To print the above output in a wider format using pandas.set_option() function. Python3 # using pd.set_option() # to widen the output # display pd.set_option('display.max_columns', 100) # show the dataframe df Output: Method 2: Using pd.options.display.max_columns attribute. This attribute is used to set the no. of columns to show in the display of the pandas dataframe. Example: Python3 # importing numpy library import numpy as np # importing pandas library import pandas as pd # define a dataframe of # 15 rows and 200 columns # with random entries df = pd.DataFrame(np.random.randint(0, 100, size =(15, 200))) # show the dataframe df Output: To print the above output in a wider format using pd.options.display.max_columns attribute. Python3 # using an alternative # way to use # pd.set_option() method # to widen the output # display pd.options.display.max_columns = 200 # show the dataframe df Output: Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills, become a part of the hottest trend in the 21st century.Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve. Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore. Last Updated : 18 Aug, 2020 Like Article Save Article Previous Set Pandas dataframe background Color and font color in Python Next Get the day from a date in Pandas Share your thoughts in the comments Add Your Comment Please Login to comment...