You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2022/08/17 16:36:00 UTC

[jira] [Created] (ARROW-17449) [Python] Better repr for Buffer, MemoryPool and friends

Antoine Pitrou created ARROW-17449:
--------------------------------------

             Summary: [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


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)