Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22216 Improving PySpark/Pandas interoperability
  3. SPARK-22274

User-defined aggregation functions with pandas udf

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.4.0
    • PySpark
    • None

    Description

      This function doesn't implement partial aggregation and shuffles all data. A uadf that supports partial aggregation is not covered by this Jira.
      Exmaple:

      @pandas_udf(DoubleType())
      def mean(v)
            return v.mean()
      
      df.groupby('id').apply(mean(df.v1), mean(df.v2))
      

      Attachments

        Activity

          People

            icexelloss Li Jin
            icexelloss Li Jin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: