pyarrow.string

pyarrow.string()

Create UTF8 variable-length string type.

Examples

Create an instance of a string type:

>>> import pyarrow as pa
>>> pa.string()
DataType(string)

and use the string type to create an array:

>>> pa.array(['foo', 'bar', 'baz'], type=pa.string())
<pyarrow.lib.StringArray object at ...>
[
  "foo",
  "bar",
  "baz"
]