[ 
https://issues.apache.org/jira/browse/ARROW-17821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608676#comment-17608676
 ] 

Joris Van den Bossche commented on ARROW-17821:
-----------------------------------------------

I think giving an actual code example will be helpful to make it clear what you 
exactly mean.

Currently, we already have something like this:

{code}
>>> A = pa.array([[1, 2], [3, 4, 5]])
>>> B = pa.array([[0.1, 0.2, 0.3], [0.4, 0.5]])
>>> pc.make_struct(A, B, field_names=["A", "B"]).type
StructType(struct<A: list<item: int64>, B: list<item: double>>)
{code}

This gives a Struct of List fields, but you want to have a List of structs?

> Implement zip()
> ---------------
>
>                 Key: ARROW-17821
>                 URL: https://issues.apache.org/jira/browse/ARROW-17821
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++, Python
>            Reporter: Adam Lippai
>            Priority: Major
>
> If column A has list\(x), column B has list\(y), column C has list(z), I'd 
> like to be able to create D = zip(A,B,C) where D would be list(\{ A: x, B: y, 
> C: z}).
> x, y, z are types in the example, type of the resulting is D is list(struct).
> Other features to consider:
>  * Zipping list(struct) with list\(x) or list(struct) with list(struct) 
> should be able to merge
>  * Zipping A,B into a Map with keys from A, values from B



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to