domoritz commented on PR #40408:
URL: https://github.com/apache/arrow/pull/40408#issuecomment-1984382643

   Python (which uses C++ which could be considered the canonical 
implementation) only allows string keys
   
   ```py
   Traceback (most recent call last):
     File "/Users/dominik/Code/ramsch/map.py", line 8, in <module>
       table = pa.table({'a': range(10), 'b': np.random.randn(10), 'c': [{x: x} 
for x in range(10)]})
               
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "pyarrow/table.pxi", line 5204, in pyarrow.lib.table
     File "pyarrow/table.pxi", line 1813, in pyarrow.lib._Tabular.from_pydict
     File "pyarrow/table.pxi", line 5339, in pyarrow.lib._from_pydict
     File "pyarrow/array.pxi", line 374, in pyarrow.lib.asarray
     File "pyarrow/array.pxi", line 344, in pyarrow.lib.array
     File "pyarrow/array.pxi", line 42, in pyarrow.lib._sequence_to_array
     File "pyarrow/error.pxi", line 154, in 
pyarrow.lib.pyarrow_internal_check_status
     File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
   pyarrow.lib.ArrowTypeError: Expected dict key of type str or bytes, got 'int'
   ```


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

Reply via email to