-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Regression in DataFrame.sum with mixed datetime, numeric and missing values #30886
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
huh, the fact that the reindex is necessary is weird. I'll take a look a this. |
I assume it's the introduction of the missing values, but haven't looked closely. |
Tentatively looks like moving from fstring back to .format in integer_op_not_supported fixes this |
Could you paste the C code that is generated by Cython for the f-string and the |
fstring version:
.format version
|
Thanks. Both look completely correct to me. Even the call to @TomAugspurger, are both tests using the exact same CPython installation and version? Can you confirm that the only difference is the Pandas version? @jbrockmendel, can you confirm that the C code snippets you pasted are those that allowed you to reproduce the differing behaviour? |
Just double checked: the pasted code matches what I have locally for master and #30905, respectively, which reproduce the differing behavior. |
I agree. May suggest that the problem is somewhere else entirely. From what I gather, the creation of the It could be that the Could someone run both versions in a CPython debug build to see if that's more informative? |
To get things rolling, I can reproduce without the reindex, but it does appear to require (this is on 8bdd7b1)
The traceback for A Cpython debug build is going to have tom wait until after a bunch more caffeine |
Digging in a little further, it looks like it has something to do with whether the ndarray we end up summing in nanops.nansum is F-contiguous or not. The relevant call ends up being
@scoder is this verging on being helpful? Worth pinging one of our numpy friends? |
@jbrockmendel ah, yes, that looks like a bug in NumPy then. Could just be a missing error return on their side. Worth pinging them, absolutely. |
On 0.25.3
On 0.25.x
cc @jbrockmendel
The text was updated successfully, but these errors were encountered: