Hi I am trying to create a new array from a previous array. such that in new array the first element is mean of first 20 elements from existing array. Here is my code. I am not sure why its not working.
#Averages
RPMA=[]
for i in range(9580):
for j in range (0,191600):
a=RPM.iloc[j:j+20]
RPMA(i)= a.mean()
RPMA(i)= a.mean()=>RPMA.append(a.mean()). By the way, note thatiplays no role here -- you should check if the firstforloop is needed and why