@@ -2077,8 +2077,8 @@ def test_series_from_index_dtype_equal_does_not_copy(self):
2077
2077
2078
2078
def test_series_string_inference (self ):
2079
2079
# GH#54430
2080
- pa = pytest .importorskip ("pyarrow" )
2081
- dtype = pd . ArrowDtype ( pa . string ())
2080
+ pytest .importorskip ("pyarrow" )
2081
+ dtype = " string[pyarrow_numpy]"
2082
2082
expected = Series (["a" , "b" ], dtype = dtype )
2083
2083
with pd .option_context ("future.infer_string" , True ):
2084
2084
ser = Series (["a" , "b" ])
@@ -2092,25 +2092,25 @@ def test_series_string_inference(self):
2092
2092
@pytest .mark .parametrize ("na_value" , [None , np .nan , pd .NA ])
2093
2093
def test_series_string_with_na_inference (self , na_value ):
2094
2094
# GH#54430
2095
- pa = pytest .importorskip ("pyarrow" )
2096
- dtype = pd . ArrowDtype ( pa . string ())
2095
+ pytest .importorskip ("pyarrow" )
2096
+ dtype = " string[pyarrow_numpy]"
2097
2097
expected = Series (["a" , na_value ], dtype = dtype )
2098
2098
with pd .option_context ("future.infer_string" , True ):
2099
2099
ser = Series (["a" , na_value ])
2100
2100
tm .assert_series_equal (ser , expected )
2101
2101
2102
2102
def test_series_string_inference_scalar (self ):
2103
2103
# GH#54430
2104
- pa = pytest .importorskip ("pyarrow" )
2105
- expected = Series ("a" , index = [1 ], dtype = pd . ArrowDtype ( pa . string ()) )
2104
+ pytest .importorskip ("pyarrow" )
2105
+ expected = Series ("a" , index = [1 ], dtype = " string[pyarrow_numpy]" )
2106
2106
with pd .option_context ("future.infer_string" , True ):
2107
2107
ser = Series ("a" , index = [1 ])
2108
2108
tm .assert_series_equal (ser , expected )
2109
2109
2110
2110
def test_series_string_inference_array_string_dtype (self ):
2111
2111
# GH#54496
2112
- pa = pytest .importorskip ("pyarrow" )
2113
- expected = Series (["a" , "b" ], dtype = pd . ArrowDtype ( pa . string ()) )
2112
+ pytest .importorskip ("pyarrow" )
2113
+ expected = Series (["a" , "b" ], dtype = " string[pyarrow_numpy]" )
2114
2114
with pd .option_context ("future.infer_string" , True ):
2115
2115
ser = Series (np .array (["a" , "b" ]))
2116
2116
tm .assert_series_equal (ser , expected )
0 commit comments