0

on Apache Spark I have a pandas_udf function that should return a pd.Series How can this be archived?

I tried:

@pandas_udf(ArrayType(LongType()), PandasUDFType.SCALAR_ITER) # Only works with spark 3.0
def udf(iterator):
  ...
  return pd.Series([1,2,3,4,5])

this gives the exception:

pyarrow.lib.ArrowNotImplementedError: NumPyConverter doesn't implement <list<item: int64>> conversion.
Jorge Machado
  • 752
  • 1
  • 8
  • 28

1 Answers1

-2

ok this was an error on my side. Schema type from pandas udf

Jorge Machado
  • 752
  • 1
  • 8
  • 28