I am new to Python. I am trying to create a 'smart merge' to merge df2 onto df1 on a hypothetical column called "Fruits" with the following conditions:
- If column in df2 not present in df1, join column on = "Fruits'
- If column in df2 is present in df1, replace column in df1
The columns in df2(except "Fruits") change everyday and this logic will subsequently be run everyday as well to ensure the joined dataset always includes the latest values and latest columns.
Thank you.