Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

[QUESTION] Pivoting a table #115

Open
am2222 opened this issue Oct 21, 2020 · 1 comment
Open

[QUESTION] Pivoting a table #115

am2222 opened this issue Oct 21, 2020 · 1 comment
Labels

Comments

@am2222
Copy link

am2222 commented Oct 21, 2020

Ask your question
Hello, Supposed we have a following table

place|time|key|value
A | t1 |test| 01
A | t2 |test| 02
A | t3 |test| 03
B | t1 |test| 04
C | t2 |test| 05
D | t3 |test| 06
A | t1 |test1| 07
A | t2 |test1| 08
A | t3 |test1| 08
B | t1 |test1| 09
C | t2 |test1| 10
D | t3 |test1| 11

Is there any way to pivot this structure into this form?
place|time|test1|test2
A | t1 | 01|07
A | t2 | 02|08
A | t3 | 03|08
B | t1 | 04|09
C | t2 | 05|10
D | t3 | 06|11
Additional context
I know I can do some joins with having another key but I am wondering if there is any dataframe-js method to do it which has a good performance as well.
Thanks

@am2222
Copy link
Author

am2222 commented Oct 21, 2020

Maybe this method?
#99

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant