-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
PERF: performance problem when comparing timestamp to datetimindex #52080
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
could do a try/except for lossless conversion to shared reso and fall back to compare_mismatches_resolutions |
thanks for noticing! tbh I'm a bit surprised that |
This is just a small reproducer, the initial problem came from parquet files where the timestamps where stored as ns reso |
is this something you have time to take on? |
I think so yes |
I considered inferring reso in date_range but it became really messy bc you could have start/end with different resos (which themselves might be inferred or already present in Timestamps). |
Uh oh!
There was an error while loading. Please reload this page.
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this issue exists on the latest version of pandas.
I have confirmed this issue exists on the main branch of pandas.
Reproducible Example
Following timings:
I guess a bunch of users will define timestamps not up to the nanosecond and hence getting mismatched resolutions which causes a really big slowdown. Can we fix this somehow for 2.0?
Time is almost exclusively spent in
cc @jbrockmendel @MarcoGorelli
Installed Versions
main
Prior Performance
No response
The text was updated successfully, but these errors were encountered: