how to vectorise pandas calculation that is based on last x rows of data,df.shift(365).rolling(10).B.mean()