-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] Implement pa.array() with type=union type #19157
Comments
Antoine Pitrou / @pitrou: Also, we would have to choose a union kind (dense or sparse). |
Uwe Korn / @xhochy: |
Wes McKinney / @wesm: |
Wes McKinney / @wesm: |
Antoine Pitrou / @pitrou: cc @amol- for advice. |
Joris Van den Bossche / @jorisvandenbossche: In [52]: typ = pa.union([pa.field("int", "int64"), pa.field("float", "float64")], mode="sparse")
In [53]: pa.array([1, 2.3], type=typ)
...
ArrowNotImplementedError: sparse_union
../src/arrow/util/converter.h:265 VisitTypeInline(*visitor.type, &visitor)
../src/arrow/python/python_to_arrow.cc:1015 (MakeConverter<PyConverter, PyConverterTrait>( options.type, options, pool)) |
I would also like Also, I would like to politely observe that example code snippets in previous comments are misleading, because they do not distinguish between child fields that happen to have the same data type.
As an example, consider the following union type:
Both
|
Hi all, I'm running into this today. See #43857 I don't think we necessarily need to do automatic type inference here i.e. make pyarrow smart and opinionated enough to infer these flexible schemas. However, being able to support user-specified pa.union Schemas would be a great help and seems non-controversial since the user is opting into it by specifying the schema to begin with. Curious on thoughts here. CC @assignUser |
It would be useful to be able to generate unions during type inference:
Reporter: Wes McKinney / @wesm
Related issues:
Note: This issue was originally created as ARROW-2774. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: