I have a table as below ( simplified one)
I want to select each raw and compare its Col_b value with all other raw's Col_c value . If they are equal, assign/append the matching raw's Col_a value to selected raw's Col_d value
Resultant table will look like below
The traditional method with multiple for/while loops I understand . Is there some efficient ways in pandas , numpy etc to solve this.