File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 28
28
)
29
29
import pandas ._testing as tm
30
30
from pandas .core .arrays import BooleanArray
31
+ from pandas .core .arrays .string_arrow import ArrowStringArrayNumpySemantics
31
32
import pandas .core .common as com
32
33
33
34
pytestmark = pytest .mark .filterwarnings ("ignore:Mean of empty slice:RuntimeWarning" )
@@ -2476,9 +2477,14 @@ def test_by_column_values_with_same_starting_value(dtype):
2476
2477
"Mood" : [["happy" , "sad" ], "happy" ],
2477
2478
"Credit" : [2500 , 900 ],
2478
2479
"Name" : ["Thomas" , "Thomas John" ],
2479
- }
2480
+ },
2480
2481
).set_index ("Name" )
2482
+ if dtype == "string[pyarrow_numpy]" :
2483
+ import pyarrow as pa
2481
2484
2485
+ mood_values = ArrowStringArrayNumpySemantics (pa .array (["happy" , "sad" ]))
2486
+ expected_result ["Mood" ] = [mood_values , "happy" ]
2487
+ expected_result ["Mood" ] = expected_result ["Mood" ].astype (dtype )
2482
2488
tm .assert_frame_equal (result , expected_result )
2483
2489
2484
2490
You can’t perform that action at this time.
0 commit comments