-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: GH12558 where nulls contributed to normalized value_counts #12566
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
@@ -43,3 +43,5 @@ Performance Improvements | |||
|
|||
Bug Fixes | |||
~~~~~~~~~ | |||
|
|||
- Bug in `Series.value_counts` when `normalize=True` and `dropna=True` where nulls still contributed to the normalized count (:issue:`12558`) |
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.
use double backticks
934531f
to
b2d5b25
Compare
@nickeubank tests passed. Does this look OK? |
d = np.diff(np.r_[idx, len(ids)]) | ||
if dropna: | ||
m = ids[lab == -1] | ||
if compat.numpy_compat._np_version_under1p8: |
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.
from pandas import _np_version_under1p8
(do the import at the top)
done |
Looks great! |
thanks @kawochen @nickeubank |
git diff upstream/master | flake8 --diff