I have the following data.
ID1 ID2 Value
1 2 5.5
2 1 10
1 3 5
Expected output:
ID1 ID2 Value
1 2 5.5
2 1 10
I only want to hold data, when I have a value for the symmetrical entry. If I only have a entry e.g. with ID1=1 and ID2=3 but no entry for ID1=3 and ID2=1 then I want to delete this datarow. How can I do this with pandas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…