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

BUG: DTI.intersection doesnt preserve tz #7458

Merged
merged 1 commit into from
Jun 14, 2014

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 14, 2014

Closes #4690.

Also, found and fixed a bug which non-monotonic Index.union incorrectly preserves name when Index have different names.

# monotonic
idx1 = pd.Index([1, 2, 3, 4, 5], name='idx1')
idx2 = pd.Index([4, 5, 6, 7, 8], name='other')
idx1.intersection(idx2).name
# None (Expected)

# non-monotonic
idx1 = pd.Index([5, 4, 3, 2, 1], name='idx1')
idx2 = pd.Index([4, 5, 6, 7, 8], name='other')
idx1.intersection(idx2).name
# idx1

@jreback jreback added this to the 0.14.1 milestone Jun 14, 2014
jreback added a commit that referenced this pull request Jun 14, 2014
BUG: DTI.intersection doesnt preserve tz
@jreback jreback merged commit eb1ae6b into pandas-dev:master Jun 14, 2014
@sinhrks sinhrks deleted the intersection branch June 14, 2014 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Frequency DateOffsets Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DatetimeIndex.intersection should preserve timezone
2 participants