I struggled with the same problem, the code in previous answers did not work in my data files. They have 2 index columns, and the reindex operation results in NaN values ββin strange places (I will publish the contents of the data if someone wants to debug it).
I found an alternative solution. I bring this topic to life, hoping it may be useful to others:
df_c = concat([dfbd,dfplanilhas])
df_c.reset_index(inplace='True')
df_c.drop_duplicates(subset=['df_a','df_b'], take_last='True', inplace='True')
Not a very elegant solution, but it seems to work.
Hope df.update gets the join = 'external' parameter soon ...
user3847220
source
share