Skip to content

[Python] pa.table(..) returns instead of raises error if passing invalid object #16946

@asfimport

Description

@asfimport

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

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

Reporter: Joris Van den Bossche / @jorisvandenbossche
Assignee: Joris Van den Bossche / @jorisvandenbossche

PRs and other links:

Note: This issue was originally created as ARROW-7027. Please see the migration documentation for further details.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions