[
https://issues.apache.org/jira/browse/ARROW-13783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406758#comment-17406758
]
Alessandro Molina commented on ARROW-13783:
-------------------------------------------
[~jorisvandenbossche] My solution was to mostly reuse the printing that is
already available and existing, I didn't want to go into the direction of
implementing any fully custom as my primary goals was mostly to have a way to
show data in documentation and in the cookbook. In the end if you want a "nice
layouting" that's something that I felt was ok to defer to higher layers like
pandas.
The attached PR mostly reuses the schema printing and the array printing and
combines them to preview the data
{code}
pyarrow.Table
c0: int16
c1: int32
----
c0: [[1,2,3,4]]
c1: [[10,20,30,40]]
{code}
I'm not sure we need something more complex than this at pyarrow layer,
presenting data could easily be a concern we defer to higher layers and
frontends.
> [Python] Improve Table.to_string (and maybe __repr__) to also preview data of
> the table
> ---------------------------------------------------------------------------------------
>
> Key: ARROW-13783
> URL: https://issues.apache.org/jira/browse/ARROW-13783
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Affects Versions: 5.0.0
> Reporter: Alessandro Molina
> Assignee: Alessandro Molina
> Priority: Major
> Labels: pull-request-available
> Fix For: 6.0.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)