# Loop for computing data [closed]

I have two variables of data (BxHPF and ByHPF), which are equall in number of data. I would like to make a loop, which takes first value of BxHPF and ByHPF compute them, then take next one from BxHPF and ByHPF and so on. For now I have:

Computing = (float(BxHPF)/float(ByHPF))
Dat1 = math.degrees(Computing)*(-1)


In fact those equations give me correct result. But as I wrote I need to make a loop, which will count every pair from BxHPF and ByHPF with using those two variables Computing and Dat1.

To be exact BxHPF and ByHPF contain 266150 records each.

• I am afraid that the way this question is posed makes it off-topic for DSP.SE. But, having said that, I also struggle to see what exactly is the difficulty here (?). The question seems to be "How do I express an interation in Python?" and there are already resources out there that do an excellent job at that. A native iteration might be slow for you and you might have to use the iteration tools of some underlying library (like pandas for example) but even in that case, you are better off consulting the manual of that library. – A_A Jan 31 '18 at 9:07

result = [math.degrees(x/y)*(-1) for x,y in zip(BxHPF,ByHPF)]