Skip to content

BUG: DTI/TDI.get_loc with mismatched-reso scalars #48815

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

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@mroeschke mroeschke added Non-Nano datetime64/timedelta64 with non-nanosecond resolution Indexing Related to indexing on series/frames, not to indexes themselves labels Sep 27, 2022
@@ -388,6 +388,25 @@ def test_take_fill_value_with_timezone(self):


class TestGetLoc:
def test_get_loc_key_unit_mismatch(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side-related. Should this work when the key is tz-aware and idx is tz-naive (and vise versa)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ATM it works with mismatched aware/naive, but that is deprecated.

@mroeschke mroeschke added this to the 1.6 milestone Sep 27, 2022
@mroeschke mroeschke merged commit 070e1fe into pandas-dev:main Sep 27, 2022
@jbrockmendel jbrockmendel deleted the nano-get_loc branch September 27, 2022 22:39
@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
* BUG: DTI/TDI.get_loc with mismatched-reso scalars

* mypy fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves Non-Nano datetime64/timedelta64 with non-nanosecond resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants