[ 
https://issues.apache.org/jira/browse/ARROW-3832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wes McKinney closed ARROW-3832.
-------------------------------
    Resolution: Not A Problem

pandas handles strings using object arrays, so this is the correct behavior for 
{{to_pandas}}

> [Python] StringValue.to_pandas returns an array with dtype='O' instead of 'S'
> -----------------------------------------------------------------------------
>
>                 Key: ARROW-3832
>                 URL: https://issues.apache.org/jira/browse/ARROW-3832
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.11.1
>            Reporter: Yevgeni Litvin
>            Priority: Major
>
> {{When trying to get a numpy array of strings from pyarrow.StringArray type, 
> a numpy array of }}{{dtype=object}}{{ is returned. Tried both Python 3.5 and 
> 2.7.}}
> {{To reproduce:}}
> {{{{pa.StringArray.from_buffers(1, 
> pa.py_buffer(b'\x00\x00\x00\x00\x05\x00\x00\x00'), 
> pa.py_buffer(b'hello')).to_pandas()}}}}
>  
> {{Result:}}
> {{Out[27]: array(['hello'], dtype=object)}}
>  
> {{I would expect the result to be:}}
> {{array([b'hello'], dtype='|S5')}}
> {{(or '|U5' ?)}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to