File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1660,7 +1660,9 @@ class ArrowInt8(ArrowInt16):
1660
1660
type = pd .ArrowDtype (pyarrow .int8 ())
1661
1661
bit_width : int = 8
1662
1662
1663
- @Engine .register_dtype (equivalents = [pyarrow .string ])
1663
+ @Engine .register_dtype (
1664
+ equivalents = [pyarrow .string , pd .ArrowDtype (pyarrow .string ())]
1665
+ )
1664
1666
@immutable
1665
1667
class ArrowString (DataType , dtypes .String ):
1666
1668
"""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():
311
311
312
312
def test_check_equivalent (dtype : Any , pd_dtype : Any ):
313
313
"""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" )
314
320
actual_dtype = pandas_engine .Engine .dtype (pd_dtype )
315
321
expected_dtype = pandas_engine .Engine .dtype (dtype )
316
322
assert actual_dtype .check (expected_dtype )
You can’t perform that action at this time.
0 commit comments