mask0 = (df['condition'] == 1) mask1 = (df['condition'] == 0) df.loc[mask0, 'newColumn'] = df.loc[mask0, 'otherColumn1'] df.loc[mask1, 'newColumn'] = df.loc[mask1, 'otherColumn2']