Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19630#discussion_r151393292
  
    --- 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 --
    
    sounds good, but may bring some trouble when trying to figure out which one 
is data type and which one is function type...


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to