-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Behaviour change in 1.5.0 when using Timedelta
as Enum
data type
#48908
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
Thanks @maread99 for the report Haven't looked into why yet, but from git bisect this is due to #46688 |
@maread99 does this solve the issue in pandas? |
Nooooo! Reopened. Sorry. I referenced this issue in a local PR. The PR resolved my issue locally by changing the enum data-type from |
I think what happened is that #46688 changed |
@jbrockmendel It was indeed
And a maybe more general question: is pandas generally expected to respect subclasses? I can imagine that the codebase contains many more such situations and that consistent behaviour might be hard to achieve. (also, this was my first time working with cython, so please let me know if I went completely wrong somewhere) |
take |
From 1.5.0 it appears that
pd.Timedelta
behavior has changed when used as anEnum
data-type...Before:
1.5.0:
I was reluctant to report this as a bug, although it is true that the
Timedelta
class appears to no longer behave as would be expected in this case (the usual behavior when defining a data-type (includingdatetime.timedelta
) is as the 1.4.3 behavior described above).If this is considered a bug, any chance it can be fixed?
If it's not a bug, might you have any ideas as to how I could replicate the previous behavior?
Thank you!
The text was updated successfully, but these errors were encountered: