Skip to content

BUG: Fix DatetimeIndex timezone preservation when joining indexes with same timezone but different units #61234

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 4 commits into from
May 30, 2025

Conversation

myenugula
Copy link
Contributor

@myenugula
Copy link
Contributor Author

Hi @rhshadrach, could you please check this one out?

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

@mroeschke - this change will make it so the unit comes out to be the minimum between the two time inputs. Does that look like the correct behavior to you?

@mroeschke mroeschke requested a review from jbrockmendel April 16, 2025 16:09
@jbrockmendel
Copy link
Member

I agree with @rhshadrach's comment on splitting/parametrizing the test, otherwise this LGTM

myenugula and others added 2 commits April 25, 2025 17:21
Address review comments on PR pandas-dev#60080 by splitting the comprehensive test into
separate focused tests for each set operation (union, intersection, symmetric_difference).
@myenugula myenugula requested a review from rhshadrach April 29, 2025 17:05
@myenugula
Copy link
Contributor Author

Hi @rhshadrach, I see that you've requested changes. Could you please clarify what exactly needs to be changed? as I've already made the changes you've requested about assert result.tz == idx1.tz

@rhshadrach
Copy link
Member

Hi @rhshadrach, I see that you've requested changes. Could you please clarify what exactly needs to be changed? as I've already made the changes you've requested about assert result.tz == idx1.tz

Once changes are requested, the state doesn't update until another review is submitted.

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

@rhshadrach rhshadrach added this to the 3.0 milestone May 30, 2025
@rhshadrach rhshadrach added Bug Dtype Conversions Unexpected or buggy dtype conversions Timezones Timezone data dtype labels May 30, 2025
@mroeschke mroeschke merged commit 3555dbc into pandas-dev:main May 30, 2025
51 of 52 checks passed
@mroeschke
Copy link
Member

Thanks @myenugula

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Timezone upon DatetimeIndex union is changed to UTC
4 participants