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(
569569 -------
570570 pa.Array or pa.ChunkedArray
571571 """
572+ value = extract_array (value , extract_numpy = True )
572573 if isinstance (value , cls ):
573574 pa_array = value ._pa_array
574575 elif isinstance (value , (pa .Array , pa .ChunkedArray )):
Original file line number Diff line number Diff line change 88
99from pandas .compat import pa_version_under16p0
1010from pandas .errors import IndexingError
11+ import pandas .util ._test_decorators as td
1112
1213from pandas import (
1314 NA ,
@@ -1535,3 +1536,15 @@ def test_iloc_arrow_extension_array(self):
15351536 expected = df .iloc [:, df ["c" ]]
15361537 result = df_arrow .iloc [:, df_arrow ["c" ]]
15371538 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