Use fillna
on one column with the fill values being the other column:
df['foodstuff'].fillna(df['type'])
The resulting output:
0 apple-martini
1 apple-pie
2 strawberry-tart
3 dessert
4 None
Use fillna
on one column with the fill values being the other column:
df['foodstuff'].fillna(df['type'])
The resulting output:
0 apple-martini
1 apple-pie
2 strawberry-tart
3 dessert
4 None