BUG: allow Timestamp comparisons on the left by cpcloud · Pull Request #4983 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation8 Commits4 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

cpcloud

@jreback

whoosh you went all in on this! fused types!

@cpcloud

yeah ... there's an annoying vbench hit tho with index joins ... trying to find the source of it ... i actually got rid of the fused types, not necessary since really just int, datetime and Series are th possibilities

@jreback

@cpcloud

jreback

@@ -2059,6 +2059,42 @@ def check_comparators(series, other):
check_comparators(self.ts, 5)
check_comparators(self.ts, self.ts + 1)
def test_timestamp_compare(self):

Choose a reason for hiding this comment

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

not a biggie....but most of the 'time' type ops with series are in tseries/tests/test_timeseries...

Choose a reason for hiding this comment

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

cool .. moving now

@jreback

@cpcloud

cool, i'll merge after next travis pass...

@cpcloud

Now tested with Series and DataFrame

@cpcloud

For example

Timestamp('now') > pd.NaT

should return the same result as

pd.NaT < Timestamp('now')

but before this commit it didn't because when Timestamp was on the left, the values were compared whereas if NaT is on the left then the truth values are hard-coded based on rules like NaN.

@cpcloud

@cpcloud

cpcloud added a commit that referenced this pull request

Sep 27, 2013

@cpcloud

BUG: allow Timestamp comparisons on the left

@cpcloud cpcloud deleted the series-timestamp-compare branch

September 27, 2013 15:53

@l736x l736x mentioned this pull request

Aug 18, 2014

2 participants

@cpcloud @jreback