-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Use args and kwargs in Rolling.apply #33983
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a release note.
we actually want to test this for both .rolling.apply as well as .groupby.rolling.apply (as you did).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls also add a whatsnew note, 1.1, bug fixes, in groupby/rollining section
Hello @mproszewska! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-05-15 11:38:03 UTC |
pandas/tests/window/test_apply.py
Outdated
idx = Index(["gr", "a"]) | ||
expected = DataFrame([[11.0, 11.0], [11.0, 12.0]], columns=idx) | ||
|
||
result = df.rolling(1).apply(foo, kwargs={"par": 10}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you parameterize over the kwargs & args?
pytest.mark.parameterize('args_kwargs', [[None, {"par": 10}], [(10,), None]])
thanks @mproszewska cc @simonjayhawkins marked for 1.04 as well |
…s in Rolling.apply)
…ng.apply) (#34190) Co-authored-by: mproszewska <[email protected]>
kwargs
inRolling.apply()
#33433black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff