Skip to content

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 20, 2014

Derived from #7485. Comparison with DatetimeIndex result incorrectly if NaT is included.

idx1 = pd.DatetimeIndex(['2011-01-01', pd.NaT], freq='M')
idx2 = pd.DatetimeIndex([pd.NaT, '2011-01-01'], freq='M')
print(idx1 > idx2)
# [True, False]
# it must be [False, False]

@jreback jreback added this to the 0.14.1 milestone Jun 20, 2014
jreback added a commit that referenced this pull request Jun 20, 2014
BUG: DatetimeIndex comparison handles NaT incorrectly
@jreback jreback merged commit f8e94fa into pandas-dev:master Jun 20, 2014
@jreback
Copy link
Contributor

jreback commented Jun 20, 2014

thanks!

@sinhrks sinhrks deleted the dtibool branch June 21, 2014 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants