wjones127 commented on issue #37496:
URL: https://github.com/apache/arrow/issues/37496#issuecomment-1701542744

   Could you explain more why should we handle a singular `dict`? `pa.array()` 
is meant for array-like things, so I'm not sure why we would expect you could 
pass in a dictionary and have it parse as a struct. We don't parse other 
singular scalars into arrays. For example, if you pass a integer, it doesn't 
make an integer array:
   
   ```python
   >>> import pyarrow as pa
   pa.array(3)
   >>> pa.array(3)
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "pyarrow/array.pxi", line 327, in pyarrow.lib.array
     File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
     File "pyarrow/error.pxi", line 144, in 
pyarrow.lib.pyarrow_internal_check_status
   TypeError: 'int' object is not iterable
   ```


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