Reem Al-Assaf
Reem Al-Assaf

Reputation: 710

PyCharm Python Output collapses for large datasets

I have a csv file with only 11 columns and a few thousand rows.

When I use Pandas to show the content in console, I get ... after the first couple of rows.

enter image description here

How do I disable this behavior, so everything is printed out?

Upvotes: 2

Views: 187

Answers (1)

BlackMath
BlackMath

Reputation: 1858

Try using the following options in pandas:

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

In this way, the entire df will be printed.

Obviously, you can also set a pre-defined number of columns/rows.

max_rows = 100
max_cols = 100
pd.set_option('display.max_columns', max_cols )    
pd.set_option('display.max_rows', max_rows)

Upvotes: 2

Related Questions