-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Removed line about %S parses all the way up to nanosecond even if no #49349
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
Changes from 11 commits
a458ca7
f0b7640
61fa531
70877e7
81c758d
de08fcf
c92efe0
61cc679
9f5fedd
47db927
14d3a84
f709759
a7e55dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -782,15 +782,7 @@ def to_datetime( | |||||
`strftime documentation | ||||||
<https://docs.python.org/3/library/datetime.html | ||||||
#strftime-and-strptime-behavior>`_ for more information on choices, though | ||||||
note the following differences: | ||||||
|
||||||
- :const:`"%f"` will parse all the way | ||||||
up to nanoseconds; | ||||||
|
||||||
- :const:`"%S"` without :const:`"%f"` will capture all the way | ||||||
up to nanoseconds if present as decimal places, and will also handle | ||||||
the case where the number of seconds is an integer. | ||||||
|
||||||
note that "%f" will parse all the way up to nanoseconds. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to remove the formatting
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you, I have re-added the formatting. |
||||||
exact : bool, default True | ||||||
Control how `format` is used: | ||||||
|
||||||
|
@@ -969,13 +961,6 @@ def to_datetime( | |||||
... format='%Y-%m-%d %H:%M:%S.%f') | ||||||
Timestamp('2018-10-26 12:00:00.000000001') | ||||||
|
||||||
:const:`"%S"` without :const:`"%f"` will capture all the way | ||||||
up to nanoseconds if present as decimal places. | ||||||
|
||||||
Comment on lines
-972
to
-974
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you also need to remove the example code that follows There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for bringing this to my notice, I have deleted the example code. |
||||||
>>> pd.to_datetime('2017-03-22 15:16:45.433502912', | ||||||
... format='%Y-%m-%d %H:%M:%S') | ||||||
Timestamp('2017-03-22 15:16:45.433502912') | ||||||
|
||||||
**Non-convertible date/times** | ||||||
|
||||||
If a date does not meet the `timestamp limitations | ||||||
|
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.
Now, the preceding paragraph says "though note the following difference", but then there's only one difference.
Perhaps we can change it to something like
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.
Thanks, I have made the necessary changes