You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2022/08/29 10:25:00 UTC
[jira] [Resolved] (ARROW-17449) [Python] Better repr for Buffer, MemoryPool and friends
[ https://issues.apache.org/jira/browse/ARROW-17449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joris Van den Bossche resolved ARROW-17449.
-------------------------------------------
Fix Version/s: 10.0.0
Resolution: Fixed
Issue resolved by pull request 13921
[https://github.com/apache/arrow/pull/13921]
> [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, pull-request-available
> Fix For: 10.0.0
>
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> 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)