having the following example:
import pandas as pd
df = pd.DataFrame({ 'Column A' : ['null',20,30,40,'null'],'Column B' : [100,'null',30,50,'null']});

I need a Python function that takes two columns and compare them:
In case one column is a missing value, we fill it from the other column.
In case both values are 'NULL', we Keep 'NULL'.
In case of different values (inconsistent) replace both values with 'NULL'
return with one attribute
the data should look like this after running the function.

this is what I did so far, I need help implementing step number 3
def myFunction(firAttribute,secAttribute):
x=df.ix[:,[firAttribute,secAttribute]]
x['new']=x[firAttribute].fillna(x[secAttribute])
x['new2']=x[secAttribute].fillna(x[firAttribute])
x['new'] =x['new'].fillna(x['new2'])
return x['new']