[ 
https://issues.apache.org/jira/browse/ARROW-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063524#comment-16063524
 ] 

Wenchen Fan commented on ARROW-1156:
------------------------------------

yea that's true, but its functionality is quite limited, a lot of data types 
are not supported, e.g.
{code}
>>> pa.array([None], type=pa.int32())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow/array.pxi", line 1051, in pyarrow.lib.array 
(/Users/travis/build/xhochy/pyarrow-macos-wheels/arrow/python/build/temp.macosx-10.6-intel-2.7/lib.cxx:19136)
  File "pyarrow/error.pxi", line 66, in pyarrow.lib.check_status 
(/Users/travis/build/xhochy/pyarrow-macos-wheels/arrow/python/build/temp.macosx-10.6-intel-2.7/lib.cxx:7124)
pyarrow.lib.ArrowNotImplementedError: NotImplemented: No type converter 
implemented for int32
{code}

BTW if I already have a numpy array, it's less efficient if I have to convert 
numpy array to python list and call {{pyarrow.array}}

> pyarrow.Array.from_pandas should take a type parameter
> ------------------------------------------------------
>
>                 Key: ARROW-1156
>                 URL: https://issues.apache.org/jira/browse/ARROW-1156
>             Project: Apache Arrow
>          Issue Type: New Feature
>    Affects Versions: 0.4.0
>            Reporter: Wenchen Fan
>
> It's convenient to infer the data type so that users can just write 
> {{pyarrow.Array.from_pandas(arr)}}, however, sometimes users want 
> fine-grained control, e.g., if we have an object type numpy array, whose 
> values are all null. When we convert it to an arrow column vector, we may 
> need a specific type instead of NullType.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to