You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be worth introducing a Table.from_struct_array function?
I'm actually not 100% sure it is needed or if it make sense.
For example, I'm not sure how it should behave when receiving a ChunkedArray (of type StructType) vs receiving a StructArray. In which case it's behaviour feels a bit overloaded and maybe it belongs to the compute package.
Also it's already possible to do such a thing (as illustrated in the SO question). Maybe it's more a problem of documentation. An example like this could be added to the cookbook.
Given that this already exists on RecordBatch, I think it makes sense to add it to Table as well.
I'm not sure how it should behave when receiving a ChunkedArray (of type StructType) vs receiving a StructArray.
In both cases it would return a Table. I would say it is actually natural to convert a Chunked StructArray to a Table, since each column in the table is chunked anyway.
Activity
jorisvandenbossche commentedon Jan 18, 2023
Given that this already exists on RecordBatch, I think it makes sense to add it to Table as well.
In both cases it would return a Table. I would say it is actually natural to convert a Chunked StructArray to a Table, since each column in the table is chunked anyway.
GH-33500: [Python] add `Table.to/from_struct_array` (#38520)
jorisvandenbossche commentedon Jan 8, 2024
Fixed by @judahrand
apacheGH-33500: [Python] add `Table.to/from_struct_array` (apache#38520)