[ 
https://issues.apache.org/jira/browse/ARROW-17449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Miles Granger reassigned ARROW-17449:
-------------------------------------

    Assignee: Miles Granger

> [Python] Better repr for Buffer, MemoryPool and friends
> -------------------------------------------------------
>
>                 Key: ARROW-17449
>                 URL: https://issues.apache.org/jira/browse/ARROW-17449
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>            Reporter: Antoine Pitrou
>            Assignee: Miles Granger
>            Priority: Minor
>              Labels: good-first-issue, good-second-issue
>
> I think we can improve interactive use of PyArrow by making the repr of some 
> basic types (Buffer, MemoryPool...) more informative.
> See this session for example:
> {code:python}
> >>> pool = pa.default_memory_pool()
> >>> pool
> <pyarrow.lib.MemoryPool at 0x7fea126982a0>
> >>> pool.backend_name
> 'jemalloc'
> >>> buf = pa.allocate_buffer(1024, memory_pool=pool)
> >>> buf
> <pyarrow.lib.Buffer at 0x7fea5e51e7b0>
> >>> buf.is_cpu
> True
> >>> buf.is_mutable
> True
> >>> buf.size
> 1024
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to