I have a dataframe in python similar to the one in the picture and I was wondering how can I get to the same output. So if I have a certain value and there exists another va