I am trying to left merge two DataFrames but I want to left_on the first non null variable. Similar to a coalesce in SQL. Is there a way to do that?
In my example below I am left merging on a variable called 'clean_email' but I need to do something like coalesce(clean_email,email)
df = df.merge(df2, how='left',left_on='clean_email',right_on='clean_email')