Skip to content

BUG: GH3461 Fix sorting in a frame with a list of columns which contains datetime64 #3464

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 1 commit into from
Apr 25, 2013

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Apr 25, 2013

closes #3461

jreback added a commit that referenced this pull request Apr 25, 2013
BUG: GH3461 Fix sorting in a frame with a list of columns which contains datetime64[ns]
@jreback jreback merged commit f8e73d3 into pandas-dev:master Apr 25, 2013
@dougvk
Copy link

dougvk commented Jun 20, 2013

Hello, I just built pandas from source, and received this error on running unit tests:

FAIL: test_sort_datetimes (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/_/__/lib/python2.7/site-packages/pandas-0.11.1.dev_3406a54-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 8473, in test_sort_datetimes
    assert_frame_equal(df1,df2)
  File "/Users/_/__/lib/python2.7/site-packages/pandas-0.11.1.dev_3406a54-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 230, in assert_frame_equal
    assert(left.index.equals(right.index))
AssertionError

----------------------------------------------------------------------
Ran 3428 tests in 106.337s

FAILED (SKIP=129, failures=1)

I was wondering if I might have an outdated dependency. As I intend to use DataFrames, I'm a little disturbed by this failed unit test.

@jtratner
Copy link
Contributor

I get this error every time I run my own test suite. I've been ignoring it
because it passes in Travis and I never handle datetimes. That said, I ran
a test script over recent commits: the error occurs in every commit
starting from the one that merged this issue (pandas@2842383). I'm using
OSX 10.8 and get this error - maybe it's a mac thing?

On Thu, Jun 20, 2013 at 10:31 AM, Doug von Kohorn
[email protected]:

Hello, I just built pandas from source, and received this error on running
unit tests:

FAIL: test_sort_datetimes (pandas.tests.test_frame.TestDataFrame)

Traceback (most recent call last):
File "/Users//__/lib/python2.7/site-packages/pandas-0.11.1.dev_3406a54-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 8473, in test_sort_datetimes
assert_frame_equal(df1,df2)
File "/Users/
/__/lib/python2.7/site-packages/pandas-0.11.1.dev_3406a54-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 230, in assert_frame_equal
assert(left.index.equals(right.index))
AssertionError


Ran 3428 tests in 106.337s

FAILED (SKIP=129, failures=1)

I was wondering if I might have an outdated dependency. As I intend to use
DataFrames, I'm a little disturbed by this failed unit test.


Reply to this email directly or view it on GitHubhttps://github.com//pull/3464#issuecomment-19756711
.

@jreback
Copy link
Contributor Author

jreback commented Jun 20, 2013

interestingly see #3902 seems
that some int64 values on macos are different
than everyone else in tr world

I'll bet that thr value for NaT is corrupted

@jtratner
Copy link
Contributor

I'd be happy to place around with this, but I can't find where in the numpy
docs/source NaT is defined, etc. Any tips on where to look?

On Thu, Jun 20, 2013 at 11:00 AM, jreback [email protected] wrote:

interestingly see #3902 https://github.com/pydata/pandas/issues/3902seems
that some int64 values on macos are different
than everyone else in tr world

I'll bet that thr value for NaT is corrupted


Reply to this email directly or view it on GitHubhttps://github.com//pull/3464#issuecomment-19758856
.

@jreback
Copy link
Contributor Author

jreback commented Jun 20, 2013

let's make a new issue about this....

pandas/src/numpy_helper.h.....get_nat

@jreback
Copy link
Contributor Author

jreback commented Jun 20, 2013

this is copied from #3902

and ONLY true on mac (AFAIK)

the wraparound is troubling.....

In [1]: pd.Timestamp(np.iinfo(np.int64).max)
Out[1]: Timestamp('2262-04-11 23:47:16.854775807', tz=None)

In [2]: pd.Timestamp(np.iinfo(np.int64).min)
Out[2]: NaT

In [3]: pd.Timestamp(np.iinfo(np.int64).min + 1)
Out[3]: Timestamp('2262-04-10 00:12:43.145224193', tz=None)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sorting on Timestamp broken version 0.11
3 participants