I am new to python dataframes so please help me do a merge on pandas dataframe.
df1
custid custname email phone
x tina z.gmail.com 345-345-3456
y mina z1.gmail.com 445-345-3456
z zina z2.gmail.com 555-345-3456
q pina 233-456-3456
df2
custid custname email phone
x tina z.gmail.com 345-345-3456
y xina z1.gmail.com 445-345-3456
k tina tina@gmail.com 703-234-3456
q pina pina@gmail.com 233-456-3456
I want the desired output.
Insert update and delete .Update should happen if the value in not null in df1.If it is null in df1 and have value in df2 then don't update.
df3
custid custname email phone Action
x tina z.gmail.com 345-345-3456 None
y mina z1.gmail.com 445-345-3456 Update
z zina z2.gmail.com 555-345-3456 Insert
k tina tina@gmail.com 703-234-3456 Delete
q pina pina@gmail.com 233-456-3456 None