The development factor from time t to time t+1 is At+1 / At. I am trying to apply this calculation to a pandas DataFrame that looks something like below:
T0 T1 T2 0 100 200 250 1 80 120 150
Starting from another post, I tried the following
f = lambda x: np.divide(x[1], x[0])
df.applymap(f, axis=1)
but I am getting an error an index error. I would like the output to be
T0_T1 T1_T2 0 2.0 1.25 1 1.5 1.25