class_docstr: Serializer used by Python worker to evaluate Pandas UDFs
class_docstr_tok: ["Serializer","used","by","Python","worker","to","evaluate","Pandas","UDFs"]
code: def arrow_to_pandas(self, arrow_column):
      import pyarrow.types as types
  
      if self._df_for_struct and types.is_struct(arrow_column.type):
          import pandas as pd
  
          series = [
              super(ArrowStreamPandasUDFSerializer, self)
              .arrow_to_pandas(
                  column, self._struct_in_pandas, self._ndarray_as_list
              )
              .rename(field.name)
              for column, field in zip(
                  arrow_column.flatten(), arrow_column.type
              )
          ]
          s = pd.concat(series, axis=1)
      else:
          s = super(
              ArrowStreamPandasUDFSerializer, self
          ).arrow_to_pandas(
              arrow_column,
              self._struct_in_pandas,
              self._ndarray_as_list,
          )
      return s
  
imports: from pyspark.errors import PySparkRuntimeError, PySparkTypeError, PySparkValueError
  from pyspark.loose_version import LooseVersion
  from pyspark.serializers import Serializer, read_int, write_int, UTF8Deserializer, CPickleSerializer
  from pyspark.sql.pandas.types import from_arrow_type, to_arrow_type, _create_converter_from_pandas, _create_converter_to_pandas
  from pyspark.sql.types import DataType, StringType, StructType, BinaryType, StructField, LongType, IntegerType
label_desc: Use image node_id 2 for calling the ArrowStreamPandasUDFSerializer obj's underlying member method code with example usage: obj.arrow_to_pandas(arrow_column) and returns: s