You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Alexandre Cagnon (Jira)" <ji...@apache.org> on 2022/06/18 10:19:00 UTC

[jira] [Created] (ARROW-16853) pyarrow.Array affects dict keys order

Alexandre Cagnon created ARROW-16853:
----------------------------------------

             Summary: pyarrow.Array affects dict keys order
                 Key: ARROW-16853
                 URL: https://issues.apache.org/jira/browse/ARROW-16853
             Project: Apache Arrow
          Issue Type: Improvement
          Components: Python
    Affects Versions: 8.0.0
            Reporter: Alexandre Cagnon


When applying pyarrow.array() to a list of dict, the dict keys are reordered in ascending order.

Because of this I cannot preserve the original parquet data schema when doing transformations from py to arrow.

Is the key reordering the intended behaviour ?

Is there an existing workaround ?

 

Eg.

x = [\{'z': '', 'y': {'b': '', 'a': ''}}]
y = pyarrow.array(x)
print(y)
print(y.to_pylist())

 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)