New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python] Create UnionArray from mixed-type pandas categorical #19391
Comments
Wes McKinney / @wesm: |
Wes McKinney / @wesm: |
Krisztian Szucs / @kszucs: pa.array([0, 1, 2, 3, '']) Creating unions is not implemented yet, reference https://github.com/apache/arrow/blob/master/cpp/src/arrow/python/inference.cc#L377 |
Krisztian Szucs / @kszucs: What would the expected type outcome for the following cases: a1 = [1.2, 3.4, "4.6"]
a2 = [b"binary", "string"]
a3 = [[1, 2, 3], [4.0]]
a4 = ["2018-01-05", datetime.data(2018, 01, 05)] |
Wes McKinney / @wesm: |
Wes McKinney / @wesm: In the meantime I suggest homogenizing the types of your data to not have a mix of integers and strings |
Antoine Pitrou / @pitrou: |
Joris Van den Bossche / @jorisvandenbossche: |
While troublehsooting ARROW-2966 I updated my pandas dataframe with more type information. Specifically, I changed some mixed type columns to categorical instead of object. I assumed that the Table.from_pandas() would inspect the pandas type information and respect that when converting it over to a table. It doesn't seem to.
For instance, I expected this code to work, but it throws the same ArrowTypeError as ARROW-2966.
Reporter: Christopher Brooks
Related issues:
Note: This issue was originally created as ARROW-3030. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: