-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: groupby.cummin/max changing passed values to nan uncesessarily #15109
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
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Groupby
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
Comments
jreback
added a commit
to jreback/pandas
that referenced
this issue
Jan 13, 2017
skip parts of cummin test, xref pandas-dev#15109
jreback
added a commit
that referenced
this issue
Jan 13, 2017
skip parts of cummin test, xref #15109
cc @mroeschke turns out we weren't testing groupby on travis after the refactor :< I merged in #15127 which now will run these tests, but I skip the portions where this issue is causing things to fail. |
Ah so that's why that test didn't trip during the build. Thanks for keeping me posted @jreback I'll uncomment those tests once I look into the fix. |
3 tasks
AnkurDedania
pushed a commit
to AnkurDedania/pandas
that referenced
this issue
Mar 21, 2017
skip parts of cummin test, xref pandas-dev#15109
AnkurDedania
pushed a commit
to AnkurDedania/pandas
that referenced
this issue
Mar 21, 2017
closes pandas-dev#15109 Author: Matt Roeschke <[email protected]> Closes pandas-dev#15205 from mroeschke/fix_15109 and squashes the following commits: 717afb4 [Matt Roeschke] BUG: cummin/cummax nans inf values for int64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Groupby
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
after #15053 is failing. (puzzled why its not actually failing on master though).
This is local in osx (3.5), so same as the travis test (though that used numpy 1.10.4), its possible that is the cause.
because the inf values are == iNaT, and we convert these on exit from the function as we are using these to mark NaT in all int64, not just for datetimelike.
jreback@2af5806 fixes, but is kludgey. I pre-check for iNaT an if so, convert to float.
A better soln is to pass in the
is_datetimelike
flag so that the check could be done internally in cython. IOW, if is_datetimelike==True, then go ahead and treat iNaT as null, otherwise ignore it. Ideally we would actually be able to return a correctly dtyped array in the first place, but the templating code won't allow this, e.g. we have a 1-1 mapping between in-out and they are done a-priori.part of this fix could also remove the need for passing in
accum
as its wholly internal to the group by cython functions (as part of this could remove the fused typed,numeric
and replace with templated code).The text was updated successfully, but these errors were encountered: