Calculating and creating a new column based on other columns and conditions

Viewed 15

I have a data frame (With multiple rows) as example shown. I want to calculate values for column E from Column C which is defined. Column D is difference between rows for column C. Column E is basically difference of column C and addition to its previous value.

Conditions: If Value in A1 is 1 and B1 is 1. (combinations change every n rows)
E1 is defined as 100 (already defined value for different combinations) and second row is E1+D1, Third row is E2+D2... and keeps adding. How to use mapping here ? does a lambda function needs to be defined ? Any help appreciated! dataframe details

0 Answers
Related