-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
depr: Deprecate dt.with_time_unit
in favor of cast(pl.Int64).cast(pl.Datetime(time_unit, time_zone))
#13667
Conversation
…e(time_unit, time_zone))
2d3f5a2
to
799ef4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to cast to Int64
and then to the type we want? I would expect casting directly to work - we should implement that I think.
EDIT: I did not read the issue thoroughly enough. It makes sense to cast to Int64 first, otherwise it would be a cast_time_unit
.
And I agree that we can drop this method as cast
should take care of this.
288bc9b
to
c2c6d4a
Compare
c2c6d4a
to
26de758
Compare
dt.with_time_unit
in favor of cast(pl.Int64).cast(pl.Datetime(time_unit, time_zone))
😄 no worries, it's very easy to confuse them, thanks for your review |
…pl.Datetime(time_unit, time_zone))` (pola-rs#13667) Co-authored-by: Stijn de Gooijer <stijndegooijer@gmail.com>
…pl.Datetime(time_unit, time_zone))` (pola-rs#13667) Co-authored-by: Stijn de Gooijer <stijndegooijer@gmail.com>
closes #13209