Am getting an error and can't seem to figure it out unsupported operand type(s) for &: 'str' and 'str' def fun(row): if row['A'] == 'H' & row['B'] == np.nan: return row['A'] df['_newcol'] = df.apply(fun, axis=1) any help or guidance is appreciated Continue reading...