-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
DOC: to_datetime format argument examples #17412
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: to_datetime format argument examples #17412
Conversation
philipphanemann commented Sep 1, 2017
- closes DOC: new mini-section on specifying formats on datetime parsing #16669
doc/source/timeseries.rst Outdated
| Providing a Format Argument | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| A specific ``format`` argument can be passed in addition to the datetime string. |
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 add something like "to ensure a specific and consistent parsing of the string"
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.
Can you also add a blankline between the title and the first sentence ?
doc/source/timeseries.rst Outdated
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| A specific ``format`` argument can be passed in addition to the datetime string. | ||
| It will potentially speed up the conversion considerably and on versions later | ||
| then 0.13.0. |
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.
The "and on versionse later than 0.13.0" can be removed as well
| .. note:: | ||
| Specifying a ``format`` argument will potentially speed up the conversion | ||
| considerably and on versions later then 0.13.0 explicitly specifying | ||
| a format string of '%Y%m%d' takes a faster path still. |
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.
Codecov Report
@@ Coverage Diff @@ ## master #17412 +/- ## ========================================= Coverage ? 91.02% ========================================= Files ? 163 Lines ? 49581 Branches ? 0 ========================================= Hits ? 45130 Misses ? 4451 Partials ? 0
Continue to review full report at Codecov.
|
doc/source/timeseries.rst Outdated
| pd.to_datetime('12-11-2010 00:00', format='%d-%m-%Y %H:%M') | ||
| For further format options see: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior |
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.
can you format the link
`text-to-display <linktext>`__
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 have put the linktext whithin the arrows and pushed. Hope that'll do
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.
After going through the contribution docs. I rebased and pushed the branch. Sorry for the inconvenience, that I first pushed to master.
jreback left a comment
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. small changes. pls rebase, ping on green.
| pd.to_datetime('2010/11/12') | ||
| pd.Timestamp('2010/11/12') | ||
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.
can you add a section ref tag here as well.
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 have put a reference to the pd.Timestamp documentation as above and pushed.
| @philipphanemann Thanks! |