Purpose of type in pandas_udf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Purpose of type in pandas_udf

Daniel Stojanov
Hi,


Note "double" in the function decorator. Is this specifying the type of
the data that goes into pandas_mean, or the type returned by that function?


Regards,




@pandas_udf("double", PandasUDFType.GROUPED_AGG)

def pandas_mean(v):

     return v.sum()



---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Purpose of type in pandas_udf

srowen
It's the return value

On Thu, Nov 12, 2020 at 5:20 PM Daniel Stojanov <[hidden email]> wrote:
Hi,


Note "double" in the function decorator. Is this specifying the type of
the data that goes into pandas_mean, or the type returned by that function?


Regards,




@pandas_udf("double", PandasUDFType.GROUPED_AGG)

def pandas_mean(v):

     return v.sum()



---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]