Skip to content

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

Closed

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.

Activity

  1. asfimport commented on Oct 30, 2019

    @asfimport
    Author

    Wes McKinney / @wesm:
    Issue resolved by pull request 5758
    #5758

  2. added this to the 0.16.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions