I have a large data frame df and a small data frame df_right with 2 columns a and b. I want to do a simple left join / lookup on a without copying df. I come up with this code but I am not sure how robust it is: I know it certainly fails when there are duplicated keys: pandas