polars icon indicating copy to clipboard operation
polars copied to clipboard

feat(python): Change default number of rows printed in Notebooks for DataFrame/Series to 10

Open stinodego opened this issue 1 year ago • 2 comments

Closes https://github.com/pola-rs/polars/issues/14515

Changes

  • For DataFrames: changed from 25 to 10.
  • For Series: changed from 25 to ~20~ 10 also.
  • Fix display when row limit is an odd number

~I guess we could also do 10 rows for both?~

stinodego avatar Feb 16 '24 14:02 stinodego

I guess we could also do 10 rows for both?

imo 10 is nice and would be consistent.

Also might have found another formatting inconsistency: 🤔

df = pl.DataFrame({"a": pl.int_range(0, 100, eager=True)})
ser = df.get_column("a")

image

Julian-J-S avatar Feb 16 '24 15:02 Julian-J-S

imo 10 is nice and would be consistent.

Let's go for that. Too much vertical scrolling in a Notebook is annoying.

Also might have found another formatting inconsistency: 🤔

There are some off-by-one errors... I think I may address the HTML ones here actually if I have time, otherwise it can be a separate PR.

stinodego avatar Feb 16 '24 15:02 stinodego