pandas.arrays.ArrowStringArray#

class pandas.arrays.ArrowStringArray(values, *, dtype=None)[source]#

Extension array for string data in a pyarrow.ChunkedArray.

Warning

ArrowStringArray is considered experimental. The implementation and parts of the API may change without warning.

Parameters:
valuespyarrow.Array or pyarrow.ChunkedArray

The array of data.

dtypeStringDtype

The dtype for the array.

Attributes

None

Methods

None

See also

array()

The recommended function for creating an ArrowStringArray.

Series.str

The string methods are available on Series backed by an ArrowStringArray.

Notes

ArrowStringArray returns a BooleanArray for comparison methods.

Examples

>>> pd.array(["This is", "some text", None, "data."], dtype="string[pyarrow]")
<ArrowStringArray>
['This is', 'some text', <NA>, 'data.']
Length: 4, dtype: string