cookbook-code
cookbook-code copied to clipboard
Depreciated warning in Section 1 > Recipe 2
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()
?
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!