I am trying to Match multiple column in different sets and update an another column with the all the unmatched column name separated by , For Eg:
Update the result column with the unmatched column name
Input Data:
Col A Col B Col C Col D Col E Col F
Ind Aus Chi Ind Aus
Aus Usa Nz Aus Uk
Chi Ind Chi Ind
Ber Ger Sri Ber Nz
Ind Aus Chi Chi Aus
Expected Output:
Col F
Col AD, Col BC Unmatched
Col BC Unmatched
Col BC Unmatched
Col AD, Col BC Unmatched
Script i have been using so far:
if Col E != " ":
if Col A != Col D && Col B != Col C:
df['Col F'] = "Col AD, Col BC Unmatched"
else:
df['Col F'] = "Matched"
Not able to understand how to perform this