-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Arrowpyarrow functionalitypyarrow functionalityBugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.IndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves
Description
arr = pd.array(['foo', 'bar'], dtype='string[pyarrow]')
arr2 = arr[:]
arr2[0] = 'baz'
>>> arr
<ArrowStringArray>
['foo', 'bar']
Length: 2, dtype: string
Looks like in ArrowStringArray.__setitem__
we set self._data = ...
I expect this is a consquence of Arrow arrays (just the string arrays?) being immutable and there's likely not much we can do about it.
This seems likely to cause a long tail of headaches, might be better to raise for immutable arrays (like we do with SparseArray)
Metadata
Metadata
Assignees
Labels
Arrowpyarrow functionalitypyarrow functionalityBugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.IndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselves