1

I've been struggling with this very simple issue for a while now. I've looked for a similar question (which I find hard to believe that doesn't exist) but couldn't find it.

In jupyter notebookx, whenever you print a long DataFrame or Series, it supresses a few lines, indicating that there are hidden lines with ..., I'd just like to know how to avoid that, and print all of it.

Example in the image attached

enter image description here

EdChum
  • 376,765
  • 198
  • 813
  • 562
Pedro Braz
  • 2,261
  • 3
  • 25
  • 48
  • 2
    it's a pandas display option, the output is truncated by default, see the [docs](http://pandas.pydata.org/pandas-docs/stable/options.html#frequently-used-options) you need to change the `max_rows` attribute to see more rows – EdChum Nov 29 '16 at 13:48
  • 1
    dupe: http://stackoverflow.com/questions/22824104/python-pandas-increase-maximum-number-of-rows and related http://stackoverflow.com/questions/11707586/python-pandas-how-to-widen-output-display-to-see-more-columns/11711637#11711637 – EdChum Nov 29 '16 at 13:48
  • print(mydf.to_string()) you could do like this – backtrack Nov 29 '16 at 13:49

1 Answers1

3

Based on @EdChum 's answer:

It is not a jupyter notebook option, rather a pandas option.

In the docs you'll find that you can change the option using the command:

pd.set_option('max_rows', 7)
Pedro Braz
  • 2,261
  • 3
  • 25
  • 48
  • 3
    The proposed command does no longer work as it matches multiple options (`OptionError: 'Pattern matched multiple keys'`). This works: `pd.set_option('display.max_rows', 7)` – SaschaH Jun 03 '22 at 15:16