-
- Notifications
You must be signed in to change notification settings - Fork 19.3k
ENH/WIP: resolution inference in pd.to_datetime, DatetimeIndex #55901
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
ENH/WIP: resolution inference in pd.to_datetime, DatetimeIndex #55901
Conversation
22291a7 to fd6c695 Compare fd6c695 to 29854b7 Compare 16acf25 to 51ce4a3 Compare f1ec518 to 905a1fc Compare 905a1fc to 6835800 Compare 9005743 to be2866a Compare 12f19a2 to b27f20a Compare | @mroeschke thoughts on getting this across the finish line? |
| /preview |
| | ||
| for res in [result6, result8, result9]: | ||
| # These cases go through array_to_datetime, not array_to_strptime. | ||
| # This means that as of GH#??? they do resolution inference |
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.
Is there an issue now for this?
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.
looks like this comment is out of date and all the cases now do inference. will update.
| I had 2 comments otherwise looks OK. Do you think we can also do the same for timedelta before 3.0? |
Not likely. IIRC even the scalar case doesnt do inference on strings yet. |
| Nice to finally get this in @jbrockmendel |
read_csvandto_datetime#54048doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.This is an API change so will have to wait for 3.0, posting it to get feedback on desired API in mostly-IO places where this causes API changes.
This does not yet handle Timedelta scalar, TimedeltaIndex, or pd.to_timedelta. I'd like to get those done for 3.0 but its a much lower priority than the datetime side.
I've been splitting things off to reduce the diff, will try to keep doing that. Open to suggestions for splittable components. Currently #55741 has some of the cython implementation.
19 tests are failing locally. 11 of those are stata tests that would be addressed by #55642. 4 are SAS and have a similar option available. One is in JSON and may be hard to solve, xref #55827. The rest are caused by #55737.