class_docstr: Extension dtype for string data.
  
  .. warning::
  
     StringDtype is considered experimental. The implementation and
     parts of the API may change without warning.
  
  Parameters
  ----------
  storage : {"python", "pyarrow", "pyarrow_numpy"}, optional
      If not given, the value of ``pd.options.mode.string_storage``.
  
  Attributes
  ----------
  None
  
  Methods
  -------
  None
  
  Examples
  --------
  >>> pd.StringDtype()
  string[python]
  
  >>> pd.StringDtype(storage="pyarrow")
  string[pyarrow]
class_docstr_tok: ["Extension","dtype","for","string","data",".","..","warning",":",":","StringDtype","is","considered","experimental",".","The","implementation","and","parts","of","the","API","may","change","without","warning",".","Parameters","--","--","--","--","--","storage",":","{","``","python","''",",","``","pyarrow","''",",","``","pyarrow_numpy","''","}",",","optional","If","not","given",",","the","value","of","``","pd.options.mode.string_storage","``",".","Attributes","--","--","--","--","--","None","Methods","--","--","--","-","None","Examples","--","--","--","--",">",">",">","pd.StringDtype","(",")","string","[","python","]",">",">",">","pd.StringDtype","(","storage=","''","pyarrow","''",")","string","[","pyarrow","]"]
docstr: Construct StringArray from pyarrow Array/ChunkedArray.
code: def __from_arrow__(
      self, array: pyarrow.Array | pyarrow.ChunkedArray
  ) -> BaseStringArray:
      """
      Construct StringArray from pyarrow Array/ChunkedArray.
      """
      if self.storage == "pyarrow":
          from pandas.core.arrays.string_arrow import ArrowStringArray
  
          return ArrowStringArray(array)
      elif self.storage == "pyarrow_numpy":
          from pandas.core.arrays.string_arrow import (
              ArrowStringArrayNumpySemantics,
          )
  
          return ArrowStringArrayNumpySemantics(array)
      else:
          import pyarrow
  
          if isinstance(array, pyarrow.Array):
              chunks = [array]
          else:
              # pyarrow.ChunkedArray
              chunks = array.chunks
  
          results = []
          for arr in chunks:
              # convert chunk by chunk to numpy and concatenate then, to avoid
              # overflow for large string data when concatenating the pyarrow arrays
              arr = arr.to_numpy(zero_copy_only=False)
              arr = ensure_string_array(arr, na_value=libmissing.NA)
              results.append(arr)
  
      if len(chunks) == 0:
          arr = np.array([], dtype=object)
      else:
          arr = np.concatenate(results)
  
      # Bypass validation inside StringArray constructor, see GH#47781
      new_string_array = StringArray.__new__(StringArray)
      NDArrayBacked.__init__(
          new_string_array,
          arr,
          StringDtype(storage="python"),
      )
      return new_string_array
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, ClassVar, Literal, cast
  import numpy
  from pandas._config import get_option
  from pandas._libs import lib, missing
  from pandas._libs.arrays import NDArrayBacked
  from pandas._libs.lib import ensure_string_array
  from pandas.compat import pa_version_under10p1
  from pandas.compat.numpy import function
  from pandas.util._decorators import doc
  from pandas.core.dtypes.base import ExtensionDtype, StorageExtensionDtype, register_extension_dtype
  from pandas.core.dtypes.common import is_array_like, is_bool_dtype, is_integer_dtype, is_object_dtype, is_string_dtype, pandas_dtype
  from pandas.core import ops
  from pandas.core.array_algos import masked_reductions
  from pandas.core.arrays.base import ExtensionArray
  from pandas.core.arrays.floating import FloatingArray, FloatingDtype
  from pandas.core.arrays.integer import IntegerArray, IntegerDtype
  from pandas.core.arrays.numpy_ import NumpyExtensionArray
  from pandas.core.construction import extract_array
  from pandas.core.indexers import check_array_indexer
  from pandas.core.missing import isna
label_desc: Use image node_id 6 for calling the StringDtype obj's underlying member method code with example usage: obj.__from_arrow__(array) and returns: new_string_array, ArrowStringArray, ArrowStringArrayNumpySemantics