I want to apply this function on the following columns but I could not.
def damage(a,b):
l=5
if (a==b+0.3) or ((a>=1.5* b) and (a<=1.9 * b)):
l=1
elif (a>=2* b) and (a<=2.9 * b) :
l=2
elif (a>=4) or (a>= 3* b):
l=3
elif (a==b) or (a<=b+0.3) or (a<= 1.5 *b):
l=0
return l
df['1st_day_damage'] =df[df['Cr-1'],df['Cr']].apply(damage)