I have a DF that has 2 int columns inside, 'CNT' and 'STG_TABLE_CNT'. I want to add a new column 'IS_MATCH' that returns 'Y' if 'CNT' and 'STG_TABLE_CNT' have the same value, or 'N' if they do not.
I tried this:
if result['CNT'] == result['STG_TABLE_CNT']:
result['IS_MATCH'] = 'Y'
else:
result['IS_MATCH'] = 'N'
but that is throwing the following error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I realize it is searching for equality (True/False) I am just not sure how to get around that to return 'Y' or 'N' instead