I am trying to create Loss rate table (see below) from the flow rate data frame I already have in python. Appreciate if someone can help me with the code. I have reproduced excel formulas below, but let me know if you need more information.
excel formula in cell B8 of loss rate table is =PRODUCT(B2:$H$2). This formula has been applied to the whole table, for example in cell C3 I have used =PRODUCT(C3:$H$3).
Finally, average in formula in row 13 is simple average of columns after calculating the loss rate. i.e. Formula in B13 is =AVERAGE(B8:B12)
thanks in advance for your help!
| Flow Rate | ||||||||
|---|---|---|---|---|---|---|---|---|
| A | B | C | D | E | F | G | H | |
| 1 | Month | NYD | DPD30 | DPD60 | DPD90 | DPD120 | DPD150 | Loss |
| 2 | Feb | 0.40 | 0.70 | 0.63 | 0.50 | 0.90 | 0.30 | 1.00 |
| 3 | Mar | 0.74 | 0.63 | 0.57 | 0.72 | 0.80 | 0.56 | 1.00 |
| 4 | Apr | 0.67 | 0.73 | 0.76 | 0.63 | 0.83 | 0.67 | 1.00 |
| 5 | May | 0.57 | 0.67 | 0.69 | 0.66 | 0.64 | 0.60 | 1.00 |
| 6 | June | 0.50 | 0.67 | 0.64 | 0.72 | 0.72 | 0.94 | 1.00 |
| Loss rate | ||||||||
| A | B | C | D | E | F | G | H | |
| 7 | Month | NYD | DPD30 | DPD60 | DPD90 | DPD120 | DPD150 | Loss |
| 8 | Feb | 0.02 | 0.06 | 0.08 | 0.14 | 0.27 | 0.30 | 1.00 |
| 9 | Mar | 0.08 | 0.11 | 0.18 | 0.32 | 0.44 | 0.56 | 1.00 |
| 10 | Apr | 0.13 | 0.19 | 0.26 | 0.35 | 0.56 | 0.67 | 1.00 |
| 11 | May | 0.07 | 0.12 | 0.17 | 0.25 | 0.38 | 0.60 | 1.00 |
| 12 | June | 0.10 | 0.21 | 0.31 | 0.49 | 0.68 | 0.94 | 1.00 |
| 13 | Average | 0.08 | 0.14 | 0.20 | 0.31 | 0.47 | 0.61 | 1.00 |