-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
BUG: Series rolling count ignores min_periods #30923
BUG: Series rolling count ignores min_periods #30923
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.
Thanks for the PR. Looks generally good just a question
As mentioned in my previous reply to a change request, I think we should properly handles The reason is that this However, if you feel strongly we should make the default behavior exactly the same as other APIs like |
…unt_ignores_min_periods
…unt_ignores_min_periods
…unt_ignores_min_periods
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.
ok with this for 1.0.0 if you can move this note
…unt_ignores_min_periods
Updated the behavior of rolling and expanding count so that it becomes consistent with all other rolling and expanding functions. Also updated many test cases to reflect this change of behavior.
After further investigation, I realize we can in fact make I have pushed the code changes, and also updated many test cases that were "incorrect". Now the |
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.
I think looks good but given scope of change I don't think this is suitable for 1.0 - it isn't backwards compatible in its current form with the change to how count works, so probably best for 1.1 @jreback ?
After a few rounds of debugging and code clean-up, now @jreback mentioned the fix is ok for V1.0 at 2 commits ago (bfe10f0), @WillAyd thinks the scope of change is too large for V1.0 since last commit (c0046b6). Would it be a good idea to roll-out the backward-compatible smaller fix at 2 commits ago for V1.0, and the longer-term complete fix for V1.1 with a separate PR? |
Is there a way to retrigger checks without new commits? Recently CI seems to randomly fail a lot. |
If you merge master & repush then the CI should be fixed. |
…unt_ignores_min_periods
I think we would still need some sort of Another reason why it may just be simpler to keep the default |
@mroeschke I have changed default I have kept most of the changes in the test cases, which now explicitly specifies Should I also create a new issue to add the |
@mroeschke btw changing the default |
Yes please create a new issue for possibly changing the default behavior of |
One small whatsnew comment otherwise LGTM |
Created new issue #31302. Let me know what you guys think there. |
does this fully close #26996 ? |
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.
lgtm. @mroeschke this is a straight bug fix now?
thanks for the patch @fujiaxiang |
hmm, this was supposed to backport. very odd. @fujiaxiang can you push a PR to the 1.0.x branch as well (the bot is supposed to do this). |
…ndexing-1row-df * upstream/master: (194 commits) DOC Remove Python 2 specific comments from documentation (pandas-dev#31198) Follow up PR: pandas-dev#28097 Simplify branch statement (pandas-dev#29243) BUG: DatetimeIndex.snap incorrectly setting freq (pandas-dev#31188) Move DataFrame.info() to live with similar functions (pandas-dev#31317) ENH: accept a dictionary in plot colors (pandas-dev#31071) PERF: add shortcut to Timestamp constructor (pandas-dev#30676) CLN/MAINT: Clean and annotate stata reader and writers (pandas-dev#31072) REF: define _get_slice_axis in correct classes (pandas-dev#31304) BUG: DataFrame.floordiv(ser, axis=0) not matching column-wise bheavior (pandas-dev#31271) PERF: optimize is_scalar, is_iterator (pandas-dev#31294) BUG: Series rolling count ignores min_periods (pandas-dev#30923) xfail sparse warning; closes pandas-dev#31310 (pandas-dev#31311) REF: DatetimeIndex.get_value wrap DTI.get_loc (pandas-dev#31314) CLN: internals.managers (pandas-dev#31316) PERF: avoid copies if possible in fill_binop (pandas-dev#31300) Add test for multiindex json (pandas-dev#31307) BUG: passing TDA and wrong freq to TimedeltaIndex (pandas-dev#31268) BUG: inconsistency between PeriodIndex.get_value vs get_loc (pandas-dev#31172) CLN: remove _set_subtyp (pandas-dev#31301) CI: Updated version of macos image (pandas-dev#31292) ...
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff