timsaucer opened a new issue, #811:
URL: https://github.com/apache/datafusion-python/issues/811

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   This is related to #807 but slightly different. As a user I want to be able 
to apply a transform function to every element of an array. Suppose I have a 
dataframe where one column contains an array.
   
   ```
   DataFrame()
   +-----------+
   | a         |
   +-----------+
   | [1, 2, 3] |
   | [4, 5]    |
   | [6]       |
   | []        |
   +-----------+
   ```
   
   I might want to convert this with a single line such that each element is 
converted to whether it is odd.
   
   ```
   DataFrame()
   +-----------+
   | a         |
   +-----------+
   | [True, False, True] |
   | [False, True]    |
   | [False]       |
   | []        |
   +-----------+
   ````
   
   It would be great to do something like 
`datafusion.functions.transform(col("a"), my_func)`
   
   **Describe the solution you'd like**
   
   Right now I'm not completely sure how I would do this. I think I might have 
to do an unnest, transform, and aggregate.
   
   **Describe alternatives you've considered**
   
   These could be done with a UDF.
   
   **Additional context**
   
   


-- 
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