You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python] Limit the size of the repr for large Tables #30333
The new repr is nice that it shows a preview of the data, but this can also become very long flooding your console output for larger tables.
We already default to 10 preview cols, but each column can still consist of many chunks. So it might be good to also limit it to 2 chunks?
The ChunkedArray.to_string method already has a window keyword, but that seems to control both the number of elements to show per chunk as the number of chunks (while it would be nice to limit eg to 2 chunks but show up to 10 elements for each chunk).
Will Jones / @wjones127:
What do you think of adding an inner_window field to {}PrettyPrintOptions{}? Then in the case of chunked_array, window would refer to number of chunks to show and inner_window would refer to elements to show within those chunks.
Will Jones / @wjones127:
The thing about inner window is it only helps at one level. Another way to think about the problem is that we care more about seeing primitive elements than about container elements. So we could instead have container_window and {}window{}, where the latter only applies to primitives.
Will Jones / @wjones127:
Another issue I notice is that most column types will appear as one line in a Table repr, except a struct column will display child arrays across multiple lines (like it would when the array is printed on its own).
Krisztian Szucs / @kszucs:
We can, though I wouldn't like to block the release on this issue since it is an improvement (it could even count as a new feature).
Activity
asfimport commentedon Dec 1, 2021
Will Jones / @wjones127:
What do you think of adding an
inner_windowfield to{}PrettyPrintOptions{}? Then in the case of chunked_array,windowwould refer to number of chunks to show andinner_windowwould refer to elements to show within those chunks.cc @xhochy
Example of table with repr that's a little too long as-is:
asfimport commentedon Dec 1, 2021
Joris Van den Bossche / @jorisvandenbossche:
Yes, it indeed sounds as a good start to distinguish both aspects with separate options
asfimport commentedon Jan 7, 2022
Will Jones / @wjones127:
The thing about inner window is it only helps at one level. Another way to think about the problem is that we care more about seeing primitive elements than about container elements. So we could instead have
container_windowand{}window{}, where the latter only applies to primitives.So the
windowandinner_windowwould work like:asfimport commentedon Jan 7, 2022
Will Jones / @wjones127:
Another issue I notice is that most column types will appear as one line in a Table repr, except a struct column will display child arrays across multiple lines (like it would when the array is printed on its own).
asfimport commentedon Jan 18, 2022
Krisztian Szucs / @kszucs:
Postponing to 8.0.
asfimport commentedon Jan 18, 2022
Joris Van den Bossche / @jorisvandenbossche:
Can we keep this on 7.0.0? (or keep ARROW-15329 on 7.0.0?)
The table repr is basically unusable right now unless you are using small test data
asfimport commentedon Jan 18, 2022
Krisztian Szucs / @kszucs:
We can, though I wouldn't like to block the release on this issue since it is an improvement (it could even count as a new feature).
asfimport commentedon Feb 24, 2022
Antoine Pitrou / @pitrou:
Issue resolved by pull request 12091
#12091