Imagine two series:
A B
0 nan
1 nan
0 3
1 8
How do I copy to column B the entries which appear in column A, unless that index has something already present in column B?
The only way I can think of to do this is using apply, like as follows, which seemingly is frowned upon by everyone.
df['B'] = df.apply(lambda r: r['A'] if r['B'].isnull() else r['B'], axis=1)