Answers for "pandas replace one columns with another column where it is "not a nan""

0

replace value column by another if missing pandas

import numpy as np

df['column'] = np.where(df['column'].isnull(), 'value_if_true', 'value_if_false')
Posted by: Guest on November-08-2020

Code answers related to "pandas replace one columns with another column where it is "not a nan""

Python Answers by Framework

Browse Popular Code Answers by Language