I have 2 columns in the same data frame as shown:
Col1 Col2
YES NO
YES NO
YES YES
YES NO
YES YES
YES
YES
NO
NO
I need to create a conditional: if Col1 == "YES" and Col2 == "NO" then COL2 = "YES", Meaning: if column 1 is "YES" and Column 2 is "NO" then COLUMN 2 is "YES"
I was trying with:
if df_db['Marketo LSC_x'] == "YES" and df_db['Marketo LSC_y'] == 'NO':
df_db['Marketo LSC_y'] = 'YES'
but is not working, is giving me this error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().