How do I aggregate symmetric pairs in pandas?
I have a dataframe which looks like this:
X Y count
A B 2
B A 1
C D 5
D C 3
My output should look like this:
X Y count
A B 3
C D 8
Thank you!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…