Skip to content
Advertisement

Pandas: Setting no. of max rows

I have a problem viewing the following DataFrame:

JavaScript

The problem is that it does not print all rows per default in ipython notebook, but I have to slice to view the resulting rows. Even the following option does not change the output:

JavaScript

Does anyone know how to display the whole array?

Advertisement

Answer

Set display.max_rows:

JavaScript

For older versions of pandas (<=0.11.0) you need to change both display.height and display.max_rows.

JavaScript

See also pd.describe_option('display').

You can set an option only temporarily for this one time like this:

JavaScript

You can also reset an option back to its default value like this:

pd.reset_option('display.max_rows')

And reset all of them back:

pd.reset_option('all')

Advertisement