Skip to content

DOC: use apply(raw=True) in docs to silence warning #20741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/computation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion doc/source/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down