-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC/ERR: better error message on unsuccessful datetime parsing #10720
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
Comments
I was looking at this today, what actually does need to be changed in the code? I'm having trouble understanding the logic that would need this error? Does anyone have an example? |
The idea is that when an error is raised by E.g.:
could say something like "ValueError: Unknown string format. You can coerce errors to NaT by passing errors='coerce'" |
@springcoil so there are lots of tests that assert errors using most of these tests are in |
Hello, can I participate here ? |
@baevpetr go for it |
take |
I want to clarify: after calling
and we catch it in
For now I see variants:
|
@baevpetr without looking at it too closely, I'm tentatively ruling out variant 3. As the person volunteering to put in the time to improve this, you get to choose your preferred approach. |
Just ping @jbrockmendel or @jreback or @jorisvandenbossche. |
Ping you guys one more time) |
@baevpetr if you want to put up a PR much easier to see and comment |
take |
@MomIsBestFriend for my understanding, why did you close your PR? It looked like decent changes for this ticket. Was there anything unclear for you? I can help out if you want if time is the issue for you. |
exceptions that are raised on unsuccessful datetime/timedelta parsing should add this:
you can coerce to NaT by passing errors='coerce'
comment at the end: #10674
The text was updated successfully, but these errors were encountered: