-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: astype dt64<->dt64tz #39258
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: astype dt64<->dt64tz #39258
Conversation
jbrockmendel
commented
Jan 18, 2021
- closes BUG: dt64 <-> dt64tz roundup #38622
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
pandas/core/dtypes/cast.py
Outdated
@@ -942,6 +942,32 @@ def coerce_indexer_dtype(indexer, categories): | |||
return ensure_int64(indexer) | |||
|
|||
|
|||
def _find_level() -> int: | |||
""" | |||
Find the appropriate stacklevel with which to issue a warning for astype. |
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 move this elsewhere, maybe to pandas.util._validation (or similar).
maybe just pass the names in as needed e.g. L958 (or hard-code ok too)
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.
maybe util._exceptions?
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.
sure
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.
updated + green
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.
tested with DTI, Series, DTA? (i think so, just confirming). do we allow this with Timestamp? (obviously deprecate if we do)
Yes
No, there is no Timestamp.astype |
great |