Skip to content
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

Merged
merged 118 commits into from
May 31, 2024

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Nov 9, 2023

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.

@jbrockmendel jbrockmendel added this to the 3.0 milestone Nov 10, 2023
@jbrockmendel jbrockmendel added the Non-Nano datetime64/timedelta64 with non-nanosecond resolution label Nov 10, 2023
@jbrockmendel jbrockmendel force-pushed the enh-array_to_datetime-inference branch 3 times, most recently from 22291a7 to fd6c695 Compare November 15, 2023 16:45
@jbrockmendel jbrockmendel force-pushed the enh-array_to_datetime-inference branch 2 times, most recently from 16acf25 to 51ce4a3 Compare November 18, 2023 05:58
@jbrockmendel jbrockmendel force-pushed the enh-array_to_datetime-inference branch 2 times, most recently from f1ec518 to 905a1fc Compare November 22, 2023 15:00
@jbrockmendel jbrockmendel force-pushed the enh-array_to_datetime-inference branch 4 times, most recently from 9005743 to be2866a Compare November 27, 2023 22:14
@jbrockmendel jbrockmendel force-pushed the enh-array_to_datetime-inference branch 3 times, most recently from 12f19a2 to b27f20a Compare November 29, 2023 16:13
@jbrockmendel
Copy link
Member Author

@mroeschke thoughts on getting this across the finish line?

@mroeschke
Copy link
Member

/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
Copy link
Member

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?

Copy link
Member Author

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.

@mroeschke
Copy link
Member

I had 2 comments otherwise looks OK. Do you think we can also do the same for timedelta before 3.0?

@jbrockmendel
Copy link
Member Author

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.

@mroeschke mroeschke merged commit 2ea036f into pandas-dev:main May 31, 2024
47 checks passed
@mroeschke
Copy link
Member

Nice to finally get this in @jbrockmendel

@jbrockmendel jbrockmendel deleted the enh-array_to_datetime-inference branch May 31, 2024 21:18
WillAyd added a commit to WillAyd/pandas that referenced this pull request Aug 22, 2024
WillAyd added a commit to WillAyd/pandas that referenced this pull request Aug 22, 2024
WillAyd added a commit to WillAyd/pandas that referenced this pull request Aug 22, 2024
WillAyd added a commit to WillAyd/pandas that referenced this pull request Aug 22, 2024
WillAyd added a commit to WillAyd/pandas that referenced this pull request Aug 22, 2024
WillAyd added a commit to WillAyd/pandas that referenced this pull request Aug 27, 2024
lithomas1 pushed a commit to lithomas1/pandas that referenced this pull request Sep 8, 2024
@WillAyd WillAyd mentioned this pull request Sep 13, 2024
5 tasks
WillAyd added a commit to WillAyd/pandas that referenced this pull request Sep 20, 2024
jorisvandenbossche pushed a commit to WillAyd/pandas that referenced this pull request Oct 2, 2024
jorisvandenbossche pushed a commit to WillAyd/pandas that referenced this pull request Oct 2, 2024
jorisvandenbossche pushed a commit to WillAyd/pandas that referenced this pull request Oct 3, 2024
jorisvandenbossche pushed a commit to WillAyd/pandas that referenced this pull request Oct 7, 2024
jorisvandenbossche pushed a commit that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment