I have data like this
col1 col2 col3 col4
A 4 6 12 10
B 16 12 8 5
C 4 5 20 9
D 4 10 10 18
E 10 10 12 9
I want to calculate ratio of rows A and B, C and D and B and E i.e create new row that contain the result of A/B and other row that contain the result of C/D and other row that conatin the result of B and E
so the result will be
col1 col2 col3 col4
A 4 6 12 10
B 16 12 8 5
C 4 5 20 9
D 4 10 10 18
E 10 10 12 9
A/B 0.25 0.5 1.5 2
C/D 1 0.5 2 0.5
B/E 1.6 1.2 0.66 0.55
I want to know if there's any way in case where there's a lot of rows and lot of cases we want to calculate (case where we want to calculate lot of ratios )
Thank you