how to check if a column is null in pandas code example
Example 1: find nan value in dataframe python
# to mark NaN column as True
df['your column name'].isnull()
Example 2: python if column is null then
df['real_lastName'] = np.where(df['LastName'].isnull(), df['Middle'], df['LastName'] )
print (df)
FirstName Middle LastName real_lastName
0 Tom Ju NaN Ju
1 Kity NaN Rob Rob