[
https://issues.apache.org/jira/browse/ARROW-6926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978472#comment-16978472
]
Antoine Pitrou commented on ARROW-6926:
---------------------------------------
You can call {{object.\_\_sizeof\_\_}} to get the baseline, for example:
{code}
>>> v = set(range(500))
>>>
>>>
>>> type(v).__sizeof__(v)
>>>
>>>
32968
>>> object.__sizeof__(v)
>>>
>>>
200
{code}
> [Python] Support __sizeof__ protocol for Python objects
> -------------------------------------------------------
>
> Key: ARROW-6926
> URL: https://issues.apache.org/jira/browse/ARROW-6926
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Reporter: Matthew Rocklin
> Priority: Minor
> Fix For: 1.0.0
>
>
> It would be helpful if PyArrow objects implemented the `__sizeof__` protocol
> to give other libraries hints about how much data they have allocated. This
> helps systems like Dask, which have to make judgements about whether or not
> something is cheap to move or taking up a large amount of space.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)