Match three 'isin' statements and return index where they match, then replace value if all conditions are satisfied
Clash Royale CLAN TAG #URR8PPP Match three 'isin' statements and return index where they match, then replace value if all conditions are satisfied I want to find where three different columns in two dataframes match and then replace a value in another column if they match. How do I combine the three conditions below, perhaps in a loop form, to check if each row matches all three conditions? First two conditions - matching the values in two different columns: DATA1[DATA1[‘f_code’].isin(DATA2[‘F’])] # Column 1 DATA1[DATA1[‘b_id’].isin(DATA2[‘B’])] # Column 2 Last condition which I am writing wrong. I want the value in DATA1 'species' to match the header of DATA2 if the above two conditions are true DATA1[DATA1[‘species’] == DATA2[header = ‘SO2’] Then, if the conditions are met in that row, I want to replace the value the column named 'value' in DATA1 with the value that was under the 'SO2' header for that row. How can I do this? I tried this (not writt...