Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.4.0
    • Component/s: PySpark
    • Labels:
      None

      Description

      Window function is another place we can benefit from vectored udf and add another useful function to the pandas_udf suite.

      Example usage (preliminary):

      w = Window.partitionBy('id').rowsBetween(Window.unbounedPreceding, Window.unbounedFollowing)
      
      @pandas_udf(DoubleType())
      def mean_udf(v):
          return v.mean()
      
      df.withColumn('v_mean', mean_udf(df.v1).over(window))
      

        Attachments

          Activity

            People

            • Assignee:
              icexelloss Li Jin
              Reporter:
              icexelloss Li Jin
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: