[ https://issues.apache.org/jira/browse/ARROW-17832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joris Van den Bossche resolved ARROW-17832. ------------------------------------------- Fix Version/s: 11.0.0 Resolution: Fixed Issue resolved by pull request 14547 [https://github.com/apache/arrow/pull/14547] > [Python] Construct MapArray from sequence of dicts (instead of list of tuples) > ------------------------------------------------------------------------------ > > Key: ARROW-17832 > URL: https://issues.apache.org/jira/browse/ARROW-17832 > Project: Apache Arrow > Issue Type: Improvement > Components: Python > Reporter: Joris Van den Bossche > Assignee: Kshiteej K > Priority: Major > Labels: pull-request-available, python-conversion > Fix For: 11.0.0 > > Time Spent: 1.5h > Remaining Estimate: 0h > > From https://github.com/apache/arrow/issues/14116 > Creating a MapArray from a python sequence currently requires lists of tuples > as values: > {code} > arr = pa.array([[('a', 1), ('b', 2)], [('c', 3)]], pa.map_(pa.string(), > pa.int64())) > {code} > While I think it makes sense that the following could also work (using dicts > instead): > {code} > arr = pa.array([{'a': 1, 'b': 2}, {'c': 3}], pa.map_(pa.string(), pa.int64())) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)