How do I compare two columns in a Pandas DataFrame and output values from other columns based on the match?
So I have a pandas dataframe.
A: 3, 4, 1, 2, 1,
B 1, 2, 3, 4
C Red, Blue, Yellow, Green
D Yes, No, Maybe, True
what I want to be able to do is sequentially check column A against column B, if there is a match then output C and D relative to B.
For example the data frame above would be converted into
A Yellow, Green, Red, Blue, Red
B Maybe, True, Yes, No, Yes
I am rather new to python and pandas so I might be missing something simple here but I cannot think of solutions for this problem and...