Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
pd.rolling_mean/_sum depricated

Can anyone help with what the updated code would be to change:

pd.rolling_mean()
pd.rolling_sum()

1 response

hello,

Suppose N is your window legth, replace by:

df.rolling(window=N).mean()
df.rolling(window=N).sum()