df = pd.DataFrame({'A': [1, 2, 3, 4, 5], 'B': ['G', 'X', 'F', 'Z', 'I']})
df.ix[df.B.isin(['X', 'Y', 'Z']), 'A'] = 'T'
print(df)
Python Pandas If value in column B = equals [X, Y, Z] replace column A with "T"