Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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')
 
PREVIOUS NEXT
Tagged: #replace #column #missing #pandas
ADD COMMENT
Topic
Name
7+5 =