Fix parsing corner case closes #19382#19529
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19529 +/- ##
=======================================
Coverage 91.62% 91.62%
=======================================
Files 150 150
Lines 48714 48714
=======================================
Hits 44633 44633
Misses 4081 4081
Continue to review full report at Codecov.
|
jreback
left a comment
There was a problem hiding this comment.
pls always always add a whatsnew note for any user facing change.
The conversion code for datetimes is still all over the place because tslib.pyx still exists, would be happy to remove that.
pandas/_libs/tslib.pyx
Outdated
| return oresult | ||
|
|
||
|
|
||
| cdef bint _handle_error_require_iso8601(object val, int64_t* iresult, |
There was a problem hiding this comment.
I would rather do this inline, you are mutating the result here, and it makes the logic much harder to follow. If you want to do this in a separate PR that just refactors might be ok, but not on this one.
|
|
||
| from pandas.tseries import offsets | ||
|
|
||
| from pandas._libs.tslib import OutOfBoundsDatetime |
| @@ -1596,6 +1595,19 @@ def test_coerce_of_invalid_datetimes(self): | |||
| ) | |||
| ) | |||
|
|
|||
Yah, I've been holding off on that because there are small differences between array_to_datetime and the Timestamp constructor that I'm hoping to un-difference, then share the implementation. |
|
thanks. happy to have a cleanup in array_to_datetime, but that's a separate PR |
git diff upstream/master -u -- "*.py" | flake8 --diff