-
Given two GroupBy Objects with different row counts, is it possible to stack/hstack/concat/align them into a single object?
The following attempts were not successful:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
An easy work around may be to slice the GroupBy object as they are FastArray objects. We can obtain the 'day' columns via:
And the 'someLatency' columns via:
We can stack both via: Or simply just create a new Dataset using:
|
Beta Was this translation helpful? Give feedback.
An easy work around may be to slice the GroupBy object as they are FastArray objects.
We can obtain the 'day' columns via:
And the 'someLatency' columns via:
We can stack both via:
rt.rt_hstack.stack_rows([section1[0][1], section2[0][1]])
Or simply just create a new Dataset using:
my_ted_talk = rt.Dataset({'Day' : rt.rt_hstack.stack_rows([section1[0][1], section2[0][1]]), 'Latency' : rt.rt_hstack.stack_rows([section1[0][0], section2[0][0]])})