parameters: (cls, array: pa.Array)
return_statement: return result._with_type_metadata(cudf_dtype_from_pa_type(array.type))
docstring: Convert PyArrow Array/ChunkedArray to column
  
          Parameters
          ----------
          array : PyArrow Array/ChunkedArray
  
          Returns
          -------
          column
  
          Examples
          --------
          >>> import pyarrow as pa
          >>> import cudf
          >>> cudf.core.column.ColumnBase.from_arrow(pa.array([1, 2, 3, 4]))
          <cudf.core.column.numerical.NumericalColumn object at 0x7f8865497ef0>
docstring_summary: Convert PyArrow Array/ChunkedArray to column
docstring_tokens: Convert PyArrow Array / ChunkedArray to column
function: def from_arrow(cls, array: pa.Array) -> ColumnBase:
          """
          Convert PyArrow Array/ChunkedArray to column
  
          Parameters
          ----------
          array : PyArrow Array/ChunkedArray
  
          Returns
          -------
          column
  
          Examples
          --------
          >>> import pyarrow as pa
          >>> import cudf
          >>> cudf.core.column.ColumnBase.from_arrow(pa.array([1, 2, 3, 4]))
          <cudf.core.column.numerical.NumericalColumn object at 0x7f8865497ef0>
          """
          if not isinstance(array, (pa.Array, pa.ChunkedArray)):
              raise TypeError("array should be PyArrow array or chunked array")
  
          data = pa.table([array], [None])
  
          if isinstance(array.type, pa.DictionaryType):
              indices_table = pa.table(
                  {
                      "None": pa.chunked_array(
                          [chunk.indices for chunk in data["None"].chunks],
                          type=array.type.index_type,
                      )
                  }
              )
              dictionaries_table = pa.table(
                  {
                      "None": pa.chunked_array(
                          [chunk.dictionary for chunk in data["None"].chunks],
                          type=array.type.value_type,
                      )
                  }
              )
  
              codes = libcudf.interop.from_arrow(
                  indices_table, indices_table.column_names
              )[0]["None"]
              categories = libcudf.interop.from_arrow(
                  dictionaries_table, dictionaries_table.column_names
              )[0]["None"]
  
              return build_categorical_column(
                  categories=categories,
                  codes=codes,
                  mask=codes.base_mask,
                  size=codes.size,
                  ordered=array.type.ordered,
              )
          elif isinstance(array.type, pa.StructType):
              return cudf.core.column.StructColumn.from_arrow(array)
          elif isinstance(
              array.type, pd.core.arrays._arrow_utils.ArrowIntervalType
          ):
              return cudf.core.column.IntervalColumn.from_arrow(array)
  
          result = libcudf.interop.from_arrow(data, data.column_names)[0]["None"]
  
          return result._with_type_metadata(cudf_dtype_from_pa_type(array.type))
function_tokens: def from_arrow ( cls , array : pa . Array ) -> ColumnBase : if not isinstance ( array , ( pa . Array , pa . ChunkedArray ) ) : raise TypeError ( "array should be PyArrow array or chunked array" ) data = pa . table ( [ array ] , [ None ] ) if isinstance ( array . type , pa . DictionaryType ) : indices_table = pa . table ( { "None" : pa . chunked_array ( [ chunk . indices for chunk in data [ "None" ] . chunks ] , type = array . type . index_type , ) } ) dictionaries_table = pa . table ( { "None" : pa . chunked_array ( [ chunk . dictionary for chunk in data [ "None" ] . chunks ] , type = array . type . value_type , ) } ) codes = libcudf . interop . from_arrow ( indices_table , indices_table . column_names ) [ 0 ] [ "None" ] categories = libcudf . interop . from_arrow ( dictionaries_table , dictionaries_table . column_names ) [ 0 ] [ "None" ] return build_categorical_column ( categories = categories , codes = codes , mask = codes . base_mask , size = codes . size , ordered = array . type . ordered , ) elif isinstance ( array . type , pa . StructType ) : return cudf . core . column . StructColumn . from_arrow ( array ) elif isinstance ( array . type , pd . core . arrays . _arrow_utils . ArrowIntervalType ) : return cudf . core . column . IntervalColumn . from_arrow ( array ) result = libcudf . interop . from_arrow ( data , data . column_names ) [ 0 ] [ "None" ] return result . _with_type_metadata ( cudf_dtype_from_pa_type ( array . type ) )