File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -569,6 +569,7 @@ def _box_pa_array(
569
569
-------
570
570
pa.Array or pa.ChunkedArray
571
571
"""
572
+ value = extract_array (value , extract_numpy = True )
572
573
if isinstance (value , cls ):
573
574
pa_array = value ._pa_array
574
575
elif isinstance (value , (pa .Array , pa .ChunkedArray )):
Original file line number Diff line number Diff line change 8
8
9
9
from pandas .compat import pa_version_under16p0
10
10
from pandas .errors import IndexingError
11
+ import pandas .util ._test_decorators as td
11
12
12
13
from pandas import (
13
14
NA ,
@@ -1535,3 +1536,15 @@ def test_iloc_arrow_extension_array(self):
1535
1536
expected = df .iloc [:, df ["c" ]]
1536
1537
result = df_arrow .iloc [:, df_arrow ["c" ]]
1537
1538
tm .assert_frame_equal (result , expected , check_dtype = False )
1539
+
1540
+ @td .skip_if_no ("pyarrow" )
1541
+ def test_setitem_pyarrow_int_series (self ):
1542
+ # GH#62462
1543
+ ser = Series ([1 , 2 , 3 ], dtype = "int64[pyarrow]" )
1544
+ idx = Index ([0 , 1 ])
1545
+ vals = Series ([7 , 8 ], dtype = "int64[pyarrow]" )
1546
+
1547
+ ser .iloc [idx ] = vals
1548
+
1549
+ expected = Series ([7 , 8 , 3 ], dtype = "int64[pyarrow]" )
1550
+ tm .assert_series_equal (ser , expected )
You can’t perform that action at this time.
0 commit comments