-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Add AM/PM token support on guess_datetime_format #53257
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
doc/source/whatsnew/v2.1.0.rst
Outdated
@@ -352,7 +352,7 @@ Conversion | |||
- Bug in :meth:`DataFrame.__repr__` incorrectly raising a ``TypeError`` when the dtype of a column is ``np.record`` (:issue:`48526`) | |||
- Bug in :meth:`DataFrame.info` raising ``ValueError`` when ``use_numba`` is set (:issue:`51922`) | |||
- Bug in :meth:`DataFrame.insert` raising ``TypeError`` if ``loc`` is ``np.int64`` (:issue:`53193`) | |||
- | |||
- Bug in :meth:`datetimes._guess_datetime_format` if contains "AM" / "PM" tokens (:issue:`53147`) |
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 you rewrite this in terms of :func:`to_datetime`
being affected?
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.
Done, please check.
@MarcoGorelli I tried it from the top, it was a dummy bug, but I almost couldn't figure it out until I setup my local env. |
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.
wonderful, nice work!
@mroeschke wondering if this should be backported to 2.0.2 actually, as pdep-4 was new in 2.0
EDIT: yeah let's backport, guess_datetime_format
only started being used by default in 2.0 so I'd consider this a regression. Will merge later today if there's no other comments
Thanks @juli4nb4dillo |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…datetime_format' * BUG: Add am/pm parsing support on guess_format * ⛏️ add unit tests * more unit tests * ⛏️ not guess am/pm mark * 🪲 bug fix parsing am/pm tokens * 📝 whatsnew * 📝 whats new doc * isort on whatsnew entry * move whatsnew note to 2.0.1 * 2.0.2, not 2.0.1 * clarify --------- Co-authored-by: MarcoGorelli <[email protected]> (cherry picked from commit f2de598)
…atetime_format --------- Co-authored-by: MarcoGorelli <[email protected]> (cherry picked from commit f2de598)
…guess_datetime_format)" (#53277) Backport PR #53257: BUG: Add AM/PM token support on guess_datetime_format --------- Co-authored-by: MarcoGorelli <[email protected]> (cherry picked from commit f2de598) Co-authored-by: Julian Badillo <[email protected]>
* BUG: Add am/pm parsing support on guess_format * ⛏️ add unit tests * more unit tests * ⛏️ not guess am/pm mark * 🪲 bug fix parsing am/pm tokens * 📝 whatsnew * 📝 whats new doc * isort on whatsnew entry * move whatsnew note to 2.0.1 * 2.0.2, not 2.0.1 * clarify --------- Co-authored-by: MarcoGorelli <[email protected]>
* BUG: Add am/pm parsing support on guess_format * ⛏️ add unit tests * more unit tests * ⛏️ not guess am/pm mark * 🪲 bug fix parsing am/pm tokens * 📝 whatsnew * 📝 whats new doc * isort on whatsnew entry * move whatsnew note to 2.0.1 * 2.0.2, not 2.0.1 * clarify --------- Co-authored-by: MarcoGorelli <[email protected]>
doc/source/whatsnew/v2.1.0.rst
file if fixing a bug or adding a new feature.