File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1660,7 +1660,9 @@ class ArrowInt8(ArrowInt16):
16601660 type = pd .ArrowDtype (pyarrow .int8 ())
16611661 bit_width : int = 8
16621662
1663- @Engine .register_dtype (equivalents = [pyarrow .string ])
1663+ @Engine .register_dtype (
1664+ equivalents = [pyarrow .string , pd .ArrowDtype (pyarrow .string ())]
1665+ )
16641666 @immutable
16651667 class ArrowString (DataType , dtypes .String ):
16661668 """Semantic representation of a :class:`pyarrow.string`."""
Original file line number Diff line number Diff line change @@ -311,6 +311,12 @@ def test_invalid_pandas_extension_dtype():
311311
312312def test_check_equivalent (dtype : Any , pd_dtype : Any ):
313313 """Test that a pandas-compatible dtype can be validated by check()."""
314+ if (
315+ pandas_engine .PYARROW_INSTALLED
316+ and pandas_engine .PANDAS_2_0_0_PLUS
317+ and dtype == "string[pyarrow]"
318+ ):
319+ pytest .skip ("`string[pyarrow]` gets parsed to type `string` by pandas" )
314320 actual_dtype = pandas_engine .Engine .dtype (pd_dtype )
315321 expected_dtype = pandas_engine .Engine .dtype (dtype )
316322 assert actual_dtype .check (expected_dtype )
You can’t perform that action at this time.
0 commit comments