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
Proposing a new structure operation akin to pandas' stack and unstack which pivots a record structure to a jagged array and vice versa. The main difference is that we do not have a non-trivial row index, so the ak.unstack operation would create tuple RecordArray rather than labeled columns, as is done for structure operations like ak.cross. Similarly, it might make sense to impose that ak.unstack will only operate on a tuple RecordArray. As in pandas, the default axis (level) should probably be -1 for this operation.
Interestingly, ak.concatenate with axis=-1 would be implementable with ak.stack(ak.zip([a, b, c])). For other axes, I think the more generalized pandas pivot method would need to be implemented: it can map an arbitrary set column index levels to new row index levels.
Proposing a new structure operation akin to pandas' stack and unstack which pivots a record structure to a jagged array and vice versa. The main difference is that we do not have a non-trivial row index, so the
ak.unstack
operation would create tuple RecordArray rather than labeled columns, as is done for structure operations likeak.cross
. Similarly, it might make sense to impose thatak.unstack
will only operate on a tuple RecordArray. As in pandas, the default axis (level) should probably be -1 for this operation.Examples:
The text was updated successfully, but these errors were encountered: