Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Add writable argument in pyarrow.Array.to_pandas #45341

Open
mroeschke opened this issue Jan 23, 2025 · 0 comments
Open

[Python] Add writable argument in pyarrow.Array.to_pandas #45341

mroeschke opened this issue Jan 23, 2025 · 0 comments

Comments

@mroeschke
Copy link
Contributor

Describe the enhancement requested

I figure that when calling pyarrow.Array.to_pandas, there's an effort to maintain the zero-copy conversion by making the underlying numpy data not writeable.

In [4]: import pyarrow as pa

In [5]: import datetime

In [6]: pa.array([datetime.datetime(2020, 1, 1)]).to_pandas().array._ndarray.flags
Out[6]: 
  C_CONTIGUOUS : True
  F_CONTIGUOUS : True
  OWNDATA : False
  WRITEABLE : False
  ALIGNED : True
  WRITEBACKIFCOPY : False

It would be nice if there was an option to allow the underlying data writeable like the writable option in to_numpy

Component(s)

Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant