Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19630#discussion_r151382381
  
    --- Diff: python/pyspark/sql/group.py ---
    @@ -214,15 +214,15 @@ def apply(self, udf):
     
             :param udf: A function object returned by 
:meth:`pyspark.sql.functions.pandas_udf`
     
    -        >>> from pyspark.sql.functions import pandas_udf
    +        >>> from pyspark.sql.functions import pandas_udf, PandasUDFType
             >>> df = spark.createDataFrame(
             ...     [(1, 1.0), (1, 2.0), (2, 3.0), (2, 5.0), (2, 10.0)],
             ...     ("id", "v"))
    -        >>> @pandas_udf(returnType=df.schema)
    +        >>> @pandas_udf("id long, v double", PandasUDFType.GROUP_MAP)
    --- End diff --
    
    Just an idea not blocking this PR but I think it might be nicer if we could 
take a string too for `PandasUDFType.GROUP_MAP` and etc.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to