Skip to content

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