-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Offset-based rolling window, with only one raw in dataframe and closed='left', max and min functions make python crash #24811
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
Codecov Report
@@ Coverage Diff @@
## master #24811 +/- ##
=======================================
Coverage 92.38% 92.38%
=======================================
Files 166 166
Lines 52382 52382
=======================================
Hits 48395 48395
Misses 3987 3987
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24811 +/- ##
==========================================
- Coverage 92.38% 92.38% -0.01%
==========================================
Files 166 166
Lines 52382 52379 -3
==========================================
- Hits 48395 48391 -4
- Misses 3987 3988 +1
Continue to review full report at Codecov.
|
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! Can you add a whatsnew entry to doc/source/whatsnew/v0.24.0.rst
. The Groupby/Resample/Rolling section for bug fixes starts around line 1808.
Hi @jschendel, no worries. The entry has been added now. |
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! Traveling at the moment hope to review in more detail over the next day or two
@@ -1808,6 +1808,7 @@ Plotting | |||
Groupby/Resample/Rolling | |||
^^^^^^^^^^^^^^^^^^^^^^^^ | |||
|
|||
- Bug in :func:`pandas.core.window.Rolling.min` and :func:`pandas.core.window.Rolling.max` with ``closed='left'``, a datetime-like index and only one entry in the series leading to segfault (:issue:`24718`) |
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.
Is this truly this specific? Off the top of my head seems strange that this would only be applicable to date time like indices
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.
The datetime-like index makes the program going into the function _roll_min_max_variable of window.pyx, where the bug is. I am not very sure if there is any other case triggering the function. But the program normally goes into _roll_min_max_fixed if it isn't a datetime-like index.
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.
this is fine. minor comment.
thanks @jh-wu |
…closed='left', max and min functions make python crash (pandas-dev#24811)
…closed='left', max and min functions make python crash (pandas-dev#24811)
git diff upstream/master -u -- "*.py" | flake8 --diff