I have 2 df's with common columns and values
df1:
Metal Group Trophic Level Concentration Author Title
Cadmium Algae 0.01 Chang Combined effects of Cadmium
Cadmium Algae 0.015 Robinson Cadmium in the Algae
Cadmium Chloride Algae 0.01 Jones Chloride effects in Algae
.
.
.
df2:
Metal Group Trophic Level Concentration
Cadmium Algae 0.01
Cadmium Algae 0.015
Cadmium Chloride Algae 0.01
.
.
.
I want to merge Author and Title column of df1 to their respective value in df2. The problem is: The column value that can be used to identify the corresponding author and title is sometimes different in each row.
For example, in the first row you can identify the author and title with the metal group and concentration at the same time.
In the second row you can identify the author by it's concentration.
I could also refer to several of these rows but I don't know how to do it.
I only know the pd.merge
command