Datahat
Datahat

Reputation: 3

Is there a way to view more columns in pandas. It only lists the first and the last columns

Pandas displays only the first and the last columns along with id. All other columns in the middle and their values are displayed as '...' . Is there a way to list more columns?

enter image description here

Upvotes: 0

Views: 49

Answers (2)

Ranjith Udayakumar
Ranjith Udayakumar

Reputation: 418

From seeing the data.corr() in your code, it is clear that you are talking about pandas. You can adjust the display parameter to choose your preference.

pd.set_option('display.height', 100)
pd.set_option('display.max_rows', 20)
pd.set_option('display.max_columns', 40)
pd.set_option('display.width', 100)

Upvotes: 1

Josh Friedlander
Josh Friedlander

Reputation: 11657

I assume you are talking about Pandas. If so you can adjust the parameters with

pd.set_option('display.max_columns', 500) # or whatever number you want

Upvotes: 0

Related Questions