-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: datetimelike.astype(int_other_than_i8) return requested dtype #45574
DEPR: datetimelike.astype(int_other_than_i8) return requested dtype #45574
Conversation
ee838aa
to
7b41898
Compare
dont' we have an issue about this? e.g. can you add the xref to the top |
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.
Looks good!
pandas/core/arrays/datetimelike.py
Outdated
warnings.warn( | ||
f"The behavior of .astype from {self.dtype} to {dtype} is " | ||
"deprecated. In a future version, this astype will " | ||
"raise if the conversion overflows.", |
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.
I would make this "if the conversion overflow" a bit clearer in that it does actually happen with the current values (so it's not a hypothetical "if")
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.
How about "[...] raise if the conversion overflows, as it did in this case with negative int64 values."?
Thanks! |
xref #45034 this should be just non-controversial parts of that discussion cc @jorisvandenbossche