Hi I have an Excel formula and I would like to translate it/rewrite using Python. But as you can see, it is a huge condition strcture. Each Excel cell is a column from my dataset, the definition of it does not matter here since I just to know how to translate it to Python language. So any help is really apreciated. The follow code I would like to create a condidtion sctrucure is: I would like to know how it could be created using if conditions.
#Review Reason Formula
=IF(AND(DG1=1,G1+H1>8*BV1,G1+H1>0,AC1+AR1<10),0,IF(AND(DG1=1,G1+H1>30),0,IF(DG1-J1>0,IF(K1=1,IF(CK1<3,"NLA",IF(DP1=1,"auto_URGENTE","auto")),IF(SUM(M1:N1)>0,IF(M1=5,"Quality Block","Active Replacement"),IF(DN1=1,IF(DG1>0,"Demand",0),IF(CK1>$BJ$5,(IF(AND(DD1>0,E1=1),IF(DP1=1,"auto_URGENTE","auto"),IF(I1>0,"External PO",IF(AND(DH1=0,DP1=0),0,IF(DP1=1,"auto_URGENTE","auto"))))),IF(CK1>$BJ$6,IF(DP1=1,"auto_URGENTE","auto"),"Critical"))))),IF(AND(G1+H1+I1+J1+SUM(BK1:BQ1)<0,CI1>0),"BO",IF(K1&L1&M1&N1="0000",IF(OR((AB1+AA1)*0.4<AVERAGE(O1:AB1),(AQ1+AP1)*0.4<AVERAGE(AD1:AQ1)),IF(G1+I1+H1+J1<AB1+AA1+AQ1+AP1,IF((VLOOKUP(A1,SumIfsReplacement!A:B,2,0))*1>AA1+AB1+AP1+AQ1,IF(CN1<0,"Possible BO",0),0),0),0),0)))))