How to show the values of a single dataframe from the merge between two dataframes?
I can't comment yet to verify first. For your example though, I think right join will do the job.
df_open.merge(df_closed, on=('Primary_key', 'Name'), how='right')
I am newbie in python, I have one scenario :
I have two dataframes df_open & df_closed. df_open is having old values and needs to be updated using df_closed periodically.
For ex:
df_open




Primary_key
Name




1
A


2
B




df_closed




Primary_key
Name




1
A


2
X


3
C




And my desired output is
df_open




Primary_key
Name




1
A


2
X


3
C




This is some kinda of upsert operation which needs to be implemented using python pandas.
Thanks :)