check if column is null condition code example
Example 1: how to check if a column is null in sql
SELECT column_name FROM table_name
WHERE column_name IS NULL;
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