SyntaxFix
Write A Post
Hire A Developer
Questions
ravgs = [sum(data[i:i+5])/5. for i in range(len(data)-4)]
This isn't the most efficient approach but it will give your answer and I'm unclear if your window is 5 points or 10. If its 10, replace each 5 with 10 and the 4 with 9.