I'm trying to print the column name in a new column 'result' if the 'b' or 'c' match (equal) 'a' for every row.
This is an example, I have more than 10 column names.
my df is like this:
a b c
a 0 1 2
b 4 4 5
c 6 7 6
d 9 9 11
expected result:
a b c result
a 0 1 2 NaN
b 4 4 5 b
c 6 7 6 c
d 9 9 11 b