:49911640 `def formula(row): s0= row[0] s1= row[1] s2= row[2] s3= row[3] if s1 !="": return s1 elif s2 !="": return s2 elif s3 !="": return s3 else: return s0 df1["final"]=df1.apply(formula,axis = "columns") df1`