I am trying to use an Conditional IF statement using python but not getting the expected Output. Please suggest what can be done next to it.
Input Data :
Col1 Col2 Col3 Col4
No Gap India 80
All Gaps USA 85
No Gap India 95
All Gaps Maxico 90
The code i have been trying so far:
if df['Col1'] == "No Gaps" and df['Col2'] == "India" and df['Col3'] >=85:
df['Col4'] = "No"
else:
df['Col4'] = "Yes"
Getting the Error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Please Suggest.