-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: window function count should count anything non-null #12541
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
Comments
yes that looks right. anything break if you do that? |
I was going to help on this during my lunch, but it looks like this causes a bunch of tests to fail in test_window.py since they expect floats. Not sure if the tests should just be coerced to expect int - I can't think of a case where a count should be a float. |
@masongallo the tests need to be changed as well, for |
For the record, can we state why signed int is preferred over unsigned int? |
we could just use It would probably work / be ok. |
So for consistency make this return ints. We can always revisit the |
hmm, anyone want to do this PR? |
I'm quite busy for the next week, but I'll take a look afterwards if someone doesn't beat me to it |
Hi guys, I've applied the fix suggested by @kawochen and added a specific test for that (cf. master...mralgos:gh12541). |
@mralgos if you want to put up a PR that would be great |
closes pandas-dev#12541 Author: Giacomo Ferroni <[email protected]> Author: Giacomo <[email protected]> Closes pandas-dev#15196 from mralgos/gh12541 and squashes the following commits: 65d70eb [Giacomo Ferroni] Added Periods to the test 94084b4 [Giacomo] Merge branch 'master' into gh12541 9621315 [Giacomo Ferroni] Added extra test and updated whatsnew cb84935 [Giacomo Ferroni] pylint checks 26c86a5 [Giacomo Ferroni] Test added for GH12541 ea49e77 [Giacomo Ferroni] Fix for GH12541
Right now
np.Inf
and non-numeric types are not counted.Code Sample, a copy-pastable example if possible
Expected Output
output of
pd.show_versions()
I think it can be patched, together with #12538, by
The text was updated successfully, but these errors were encountered: