-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: update DatetimeTZDtype unit limitation #58213
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
DOC: update DatetimeTZDtype unit limitation #58213
Conversation
pandas/core/dtypes/dtypes.py
Outdated
@@ -699,7 +699,7 @@ class DatetimeTZDtype(PandasExtensionDtype): | |||
---------- | |||
unit : str, default "ns" | |||
The precision of the datetime data. Currently limited |
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 think we should consider deleting "Currently limited" since there are 4 possible options now.
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.
@Aloqeely thank you for your review.
How about
The precision of the datetime data. Only supports
``"s"``, ``"ms"``, ``"us"``, ``"ns"``.
as same as error message?
if unit not in ["s", "ms", "us", "ns"]:
raise ValueError("DatetimeTZDtype only supports s, ms, us, ns units")
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.
Yes sure, Only supports
and Valid options are
both sound good to me.
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!
/preview |
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/58213/ |
Thanks @yokomotod |
* doc: update DatetimeTZDtype unit limitation * fix description
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.