write excel formula if in python

Viewed 16

I'm trying to automate excel with python & there is some function for specific column in excel like this

=IF(AND(AD2=0;AE2=0;AF2=0;AG2=0);"000-000";IF(AND(AE2=0;AF2=0;AG2=0);$AD$1;IF(AND(AF2=0;AG2=0);$AE$1;IF(AND(AG2=0);$AF$1;$AG$1))))

i need to put this formula for new column based on my dataframe like this

data = pd.DataFrame({'AD2':['0', '0', '163', '256'], 'AE2':['0', '0', '163', '236'], 'AF2':['0', '0', '163', '236'], 'AG2':['0', '139', '0', '415']})

is there any chance what kind of libraries that i need to use and example for that. Thank you

0 Answers
Related