1

We are struggling to get proper control of the number of columns and rows printed when we print(dataframe). It is super opaque and seems to be based on some mystery terminal size settings.

We are primarily using VScode on ubuntu. Can anyone explain how this works?

Ta, Andrew

Mods: please note, I have checked over lots of similar questions and have not found any answer which really answers this question.

Andrew Holway
  • 189
  • 2
  • 13

2 Answers2

0

I suppose that you could play with display options of the pandas:

with pd.option_context("display.max_rows", 10, "display.max_columns", 5):
    <....>

Roman Zh.
  • 985
  • 2
  • 6
  • 20
0

Pandas has display options.

Have you tried something like

pd.set_option("display.max_rows", 100) # ‘None’ value means unlimited.
antonis
  • 123
  • 1
  • 1
  • 9