Given this DataFrame
r3 value
r1 r2
1 2 3 1
2 4 1
3 2 1
3 4 1
4 2 1
4 3 1
2 1 3 1
1 4 1
3 1 1
3 4 1
4 1 1
4 3 1
... what is the best way to do this?
r3 value
r1 r2
1 2 3,4 2
3 2,4 2
4 2,3 2
2 1 3,4 2
3 1,4 2
4 1,3 2
Basically, I'm trying to condense a column r3into a comma-separated string. The column valuecan be reached in another way later, if necessary, or if it can be done through this whole process, even better.
source
share