-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
datetime Series should raise on most numerical ops #3726
Comments
this is fixed for all numerical type ops, eg +, - etc (some make sense some don't) |
haha indeed. shouldn't other ufuncs raise though? i think it could be prevented since u know the dtype. maybe not for object arrays. |
there's an unconditional conversion to float64 in many ops in nanops.py. while practical for most purposes i think disallowing reduction ops on dates is the way to go. additionally probably good to only allow conversion to float if it's numeric and pass |
this is a bit of an API change though, although currently there are no tests for summing over datetime64[ns] series/frames |
This is ok for Frames, as they use
|
I should have this in by today. Should I start a new section in rls notes and a new what's new doc? You mentioned that there shouldn't be any more than doc prs until 11.1 is pushed |
obvs something like
diff
is fine, but i think sum/prod and most ufuncs should raise aTypeError
maybe try the ops on thevalues
attribute and if it doesn't raise continueThe text was updated successfully, but these errors were encountered: