-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Use float64 for row counter in rank() #18274
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 #18274 +/- ##
==========================================
- Coverage 91.4% 91.38% -0.03%
==========================================
Files 164 164
Lines 49878 49878
==========================================
- Hits 45590 45580 -10
- Misses 4288 4298 +10
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18274 +/- ##
==========================================
+ Coverage 91.37% 91.38% +<.01%
==========================================
Files 164 164
Lines 49880 49880
==========================================
+ Hits 45580 45583 +3
+ Misses 4300 4297 -3
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.
does your test from the original issue repro the failure?
doc/source/whatsnew/v0.22.0.txt
Outdated
@@ -162,5 +162,5 @@ Other | |||
^^^^^ | |||
|
|||
- Improved error message when attempting to use a Python keyword as an identifier in a numexpr query (:issue:`18221`) | |||
- | |||
- Fixed incorrect maximum :func:`Series.rank` percentile for large arrays (:issue:`18271`) |
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.
move to 0.21.1
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.
move to Numeric section
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.
Both done. Thanks!
When I rerun the same code from #18271, I get the same result in
|
As reported in #18271, for a large `Series` `s` of `float`s, `Series.rank(pct=True).max()` may not be `<=1` as expected. This is due to the use of a `float` for the row counter. This updates the counter to use a `float64`.
tests |
pls rebase and update to comments |
closing as stale. if you want to continue working, pls ping. |
git diff upstream/master -u -- "*.py" | flake8 --diff
As reported in #18271, for a large
Series
s
offloat
s,Series.rank(pct=True).max()
may not be<=1
as expected.This is due to the use of a
float
for the row counter. This updates the counter to use afloat64
.