dataframe-js icon indicating copy to clipboard operation
dataframe-js copied to clipboard

[QUESTION] Pivoting a table

Open am2222 opened this issue 5 years ago • 1 comments

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 avatar Oct 21 '20 17:10 am2222

Maybe this method? https://github.com/Gmousse/dataframe-js/issues/99

am2222 avatar Oct 21 '20 17:10 am2222