DataLearner555
DataLearner555

Reputation: 93

How to get PyCharm to display entire dataframes in the output console?

I have a dataframe that has 972 columns and I am trying to see all of it but the output has all the middle columns truncated. I have tried the view variable in the debugger but it didn't work. I only got the first 30s columns. I have also tried the pandas display.width nor did it work. Can somebody help? Here's my dataframe: enter image description here

Upvotes: 3

Views: 15221

Answers (2)

Hugo Lemieux-Fournier
Hugo Lemieux-Fournier

Reputation: 985

Set a breakpoint after the dataframe has been declared, then debug your code, check frames in debugger and for your desired dataframe select "view as dataframe".

You should have a SciView window in which the dataframe can be visualized with a nice layout

Scientific mode in pycharm

Upvotes: 1

Edeki Okoh
Edeki Okoh

Reputation: 1834

You can use this option in pandas:

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

Or you can do something like this:

print(df.to_string())

Upvotes: 11

Related Questions