I have a data frame like this,
Date Open High to Low X
27-Feb-15 A P x1
26-Feb-15 B Q x2
25-Feb-15 C R x3
24-Feb-15 D S x4
i need to calculate X column values like follows,
x1 = (P+Q)/B
x2 = (Q+R)/C
'
'
is there any way to do this not using for loops using pandas?