Pandas add column with value based on condition based on other columns -  Stack Overflow