zero323 commented on pull request #32431:
URL: https://github.com/apache/spark/pull/32431#issuecomment-1029864676


   @drernie
   
   > Which doesn't even seem to be documented for Python:
   
   That's nothing more than standard Python unpacking. Can be done with any 
Python function and ones supporting variadic arguments (`*cols`) in particular. 
 Could be changed to
   
   ```python
   df.select(["*"] + [
                       F.sum(col).over(windowval).alias(col_name)
                       for col, col_name in zip(["A", "B", "C"], ["cumA", 
"cumB", "cumC"])
                   ])
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to