-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
BUG: Remove special-casing for date objects in DatetimeIndex indexing (GH#62158) #62198
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
base: main
Are you sure you want to change the base?
BUG: Remove special-casing for date objects in DatetimeIndex indexing (GH#62158) #62198
Conversation
@jbrockmendel hi I have a question about handling the new deprecation warning Thanks! |
…estamp in indexing and merging tests
…estamp in indexing and merging tests
…estamp in indexing and merging tests
Mostly looks good, will need a whatsnew note |
…et_indexer and update whatsnew note (pandas-dev#62158)
@jbrockmendel Thanks for the feedback! I’ve applied the suggested changes and updated the PR. Please let me know if there’s anything else that needs adjustment. |
Can you get the CI passing? |
Sure, I’ll look into the CI failures. |
Hi @jbrockmendel , I’ve identified that one of the CI failures is due to the |
test_align_date_objects_with_datetimeindex involves alignment that will change when dates no longer match to datetimes |
@jbrockmendel Thanks for the help! I’ve updated the changes, but CI is still failing. I’ll look into this in more detail. |
256908c
to
1c59ae7
Compare
@Aniketsy whats the word here? |
@jbrockmendel i’m stuck- getting 3 check fails, i tried to fix them but haven't been successful. Could you please take a look and guide me on this? |
The test_align_date_objects_with_datetimeindex ones look like the behavior is correct and the test The pyarrow one looks like you need to add a check to exclude |
@jbrockmendel still getting CI check fails, there are 3 test failure. I've updated as per suggestions. |
This PR resolves (GH#62158) by removing the legacy special-casing for Python date objects in DatetimeIndex indexing logic.
What’s Changed:
Removed the special-case handling of date objects in DatetimeIndex.getitem.
Updated/added tests in pandas/tests/frame/indexing/test_indexing.py to reflect the new, consistent behavior.
Please let me know if my approach or fix needs any improvements . I’m open to feedback and happy to make changes based on suggestions.
Thankyou !