Joris Van den Bossche created ARROW-7027:
--------------------------------------------

             Summary: [Python] pa.table(..) returns instead of raises error if 
passing invalid object
                 Key: ARROW-7027
                 URL: https://issues.apache.org/jira/browse/ARROW-7027
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
            Reporter: Joris Van den Bossche
             Fix For: 1.0.0


When passing eg a Series instead of a DataFrame, you get:

{code}
In [4]: df = pd.DataFrame({'a': [1, 2, 3]})                                     
                                                                                
                                                   

In [5]: table = pa.table(df['a'])                                               
                                                                                
                                                   

In [6]: table                                                                   
                                                                                
                                                   
Out[6]: TypeError('Expected pandas DataFrame or python dictionary')

In [7]: type(table)                                                             
                                                                                
                                                   
Out[7]: TypeError
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to