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)