replace value column by another if missing pandas

Solutions on MaxInterview for replace value column by another if missing pandas by the best coders in the world

showing results for - "replace value column by another if missing pandas"
Alma
01 Jan 2019
1import numpy as np
2
3df['column'] = np.where(df['column'].isnull(), 'value_if_true', 'value_if_false')