Skip to content

Commit 4a37470

Browse files
add ArrowStringArray to pd.arrays namespace
1 parent d9dcd20 commit 4a37470

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

doc/source/reference/arrays.rst

+1
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ we recommend using :class:`StringDtype` (with the alias ``"string"``).
480480
:template: autosummary/class_without_autosummary.rst
481481

482482
arrays.StringArray
483+
arrays.ArrowStringArray
483484

484485
.. autosummary::
485486
:toctree: api/

pandas/arrays/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
See :ref:`extending.extension-types` for more.
55
"""
66
from pandas.core.arrays import (
7+
ArrowStringArray,
78
BooleanArray,
89
Categorical,
910
DatetimeArray,
@@ -18,6 +19,7 @@
1819
)
1920

2021
__all__ = [
22+
"ArrowStringArray",
2123
"BooleanArray",
2224
"Categorical",
2325
"DatetimeArray",

pandas/core/arrays/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@
1717
)
1818
from pandas.core.arrays.sparse import SparseArray
1919
from pandas.core.arrays.string_ import StringArray
20+
from pandas.core.arrays.string_arrow import ArrowStringArray
2021
from pandas.core.arrays.timedeltas import TimedeltaArray
2122

2223
__all__ = [
2324
"ExtensionArray",
2425
"ExtensionOpsMixin",
2526
"ExtensionScalarOpsMixin",
27+
"ArrowStringArray",
2628
"BaseMaskedArray",
2729
"BooleanArray",
2830
"Categorical",

pandas/core/arrays/string_arrow.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,8 @@ def astype(self, dtype, copy=True):
673673
# ------------------------------------------------------------------------
674674
# String methods interface
675675

676-
_str_na_value = StringDtype.na_value
676+
# error: Cannot determine type of 'na_value'
677+
_str_na_value = StringDtype.na_value # type: ignore[has-type]
677678

678679
def _str_map(
679680
self, f, na_value=None, dtype: Dtype | None = None, convert: bool = True

0 commit comments

Comments
 (0)