How to show all columns’ names on a large pandas dataframe?

You can globally set printing options. I think this should work:

Method 1:

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

Method 2:

pd.options.display.max_columns = None
pd.options.display.max_rows = None

This will allow you to see all column names & rows when you are doing .head(). None of the column name will be truncated.


If you just want to see the column names you can do:

print(df.columns.tolist())

Leave a Comment