In [5]:
d.loc[(d['A'].isnull()) & (d.B == 't3'), 'A']='new_val'
d
Out[5]:
A B
0 NaN t1
1 t2 t2
2 new_val t3
3 t3 t4
4 new_val t3
[5 rows x 2 columns]
In [5]:
d.loc[(d['A'].isnull()) & (d.B == 't3'), 'A']='new_val'
d
Out[5]:
A B
0 NaN t1
1 t2 t2
2 new_val t3
3 t3 t4
4 new_val t3
[5 rows x 2 columns]