-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Remove old note about default unit #46103
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
Conversation
This reverts commit 438bb21.
@@ -765,8 +765,8 @@ def to_datetime( | |||
unit : str, default 'ns' | |||
The unit of the arg (D,s,ms,us,ns) denote the unit, which is an | |||
integer or float number. This will be based off the origin. | |||
Example, with ``unit='ms'`` and ``origin='unix'`` (the default), this |
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 am pretty sure this is only referencing origin and not unit
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.
Yeah, it could be interpreted either way. I suggest that it's at least potentially confusing and a maintenance risk, so we'd be better off without it.
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.
could change the order to put the "origin=unix (the default)" before "unit=ms"
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.
Indeed, but I suggest that documenting what value is the default in multiple places is asking for trouble in the long run.
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.
LGTM. Agreed, (the default)
doesn't add much here as the origin default is specified below
thanks @gsganden |
to_datetime
docstring indicates that the default unit is 'ms', but it is 'ns'. This PR simply removes that comment so that there is no need to keep it in sync with the implementation.closes #xxxx (Replace xxxx with the Github issue number)NATests added and passed if fixing a bug or adding a new featureNAAdded an entry in the latestNAdoc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.