From d1849959f9090194a523f75b2bfc0f31d7884e3b Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 19 Apr 2018 10:29:35 +0200 Subject: [PATCH] DOC: use apply(raw=True) in docs to silence warning --- doc/source/computation.rst | 2 +- doc/source/cookbook.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/computation.rst b/doc/source/computation.rst index 4285767654e25..ff06c369e1897 100644 --- a/doc/source/computation.rst +++ b/doc/source/computation.rst @@ -323,7 +323,7 @@ compute the mean absolute deviation on a rolling basis: mad = lambda x: np.fabs(x - x.mean()).mean() @savefig rolling_apply_ex.png - s.rolling(window=60).apply(mad).plot(style='k') + s.rolling(window=60).apply(mad, raw=True).plot(style='k') .. _stats.rolling_window: diff --git a/doc/source/cookbook.rst b/doc/source/cookbook.rst index 4e61228d5c0ad..893642410af02 100644 --- a/doc/source/cookbook.rst +++ b/doc/source/cookbook.rst @@ -496,7 +496,7 @@ Unlike agg, apply's callable is passed a sub-DataFrame which gives you access to def Red(x): return functools.reduce(CumRet,x,1.0) - S.expanding().apply(Red) + S.expanding().apply(Red, raw=True) `Replacing some values with mean of the rest of a group