cookbook-code icon indicating copy to clipboard operation
cookbook-code copied to clipboard

Depreciated warning in Section 1 > Recipe 2

Open sami10007 opened this issue 8 years ago • 1 comments

Run pd.rolling_mean(df['Berri1'], n).dropna().plot(); and you get


/usr/local/lib/python2.7/dist-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with 
    Series.rolling(window=15,center=False).mean()

How can you do the replacement with Series.rolling(...).mean()?

sami10007 avatar May 29 '16 09:05 sami10007

Can you try:

df['Berri1'].rolling(window=n).mean().dropna().plot()

(this is untested)

If it works, please feel free to send a Pull Request!

rossant avatar Jun 04 '16 14:06 rossant