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

Joris Van den Bossche commented on ARROW-2037:
----------------------------------------------

Not fully sure what is left to do here. The referenced issue ARROW-1941 was 
closed by https://github.com/apache/arrow/pull/1449, which included a test for 
roundtrip of columns with empty lists.

Unless it is not related to that issue? Because the example of ARROW-1941 
(column of empty lists) does not given an inferred type of 'empty' but 'mixed':

{code:python}
In [22]: empty_list_array = np.empty((3,), dtype=object) 
    ...: empty_list_array.fill([]) 
    ...:  
    ...: df = pd.DataFrame({'a': np.array(['1', '2', '3']), 
    ...:                    'b': empty_list_array})                             
                                                                                
                                                    

In [23]: df                                                                     
                                                                                
                                                    
Out[23]: 
   a   b
0  1  []
1  2  []
2  3  []

In [25]: pd.api.types.infer_dtype(df['b'], skipna=True)                         
                                                                                
                                                    
Out[25]: 'mixed'
{code}

> [Python]: Add tests for ARROW-1941 cases where pandas inferred type is 'empty'
> ------------------------------------------------------------------------------
>
>                 Key: ARROW-2037
>                 URL: https://issues.apache.org/jira/browse/ARROW-2037
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 0.8.0
>            Reporter: Phillip Cloud
>            Assignee: Phillip Cloud
>            Priority: Major
>             Fix For: 0.14.0
>
>




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

Reply via email to