-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: NaNs converted to 1970-01-01 instead of NaT #26964
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
Comments
I don't think baeb1bf is related. Do you need to rebuild your C extensions? |
Yes. I was working on my development branch to finish #26631 and kept on getting these test errors. Couldn't figure out why anything that I was working on would affect this, so...
Correctly re-compiled the one pyx file that I am working on in my development branch, and the 'nan' to 'NaT' tests still fail. I understand the confusion about me mentioning baeb1bf. I don't mean to imply that commit is the source of this problem, in fact I know that it isn't. I have had these failing tests since I began work on #26631. I just wanted to indicate the version of the code that I am using. |
I cannot reproduce this on master. Here's my pd.show_versions FWIW not sure if 32 bit or macOS vs Linux for OP matters INSTALLED VERSIONScommit : a14874f pandas : 0.25.0.dev0+782.ga14874f3e |
Seems like a problem with my numpy install...
Closing |
Here is the numpy bug. Three years old... |
At least some of these are pd.Timestamp(np.nan) = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877419 https://bugs.debian.org/877754 Gbp-Pq: Name mark_tests_working_on_intel_armhf.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86 but 1970-01-01 on arm* because float NaN -> int is undefined: numpy/numpy#8325 pandas-dev/pandas#17792 pandas-dev/pandas#26964 On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262) On riscv64 one test case raises an exception (though I suspect not the general case since there aren't more). Author: Andreas Tille <[email protected]>, Graham Inggs <[email protected]>, Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/877754 Forwarded: no Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
Code Sample, a copy-pastable example if possible
0 1970-01-01 00:00:00.000000001
1 1970-01-01 00:00:00.000000002
2 1970-01-01 00:00:00.000000000
3 1970-01-01 00:00:00.000000000
4 1970-01-01 00:00:00.000000000
dtype: datetime64[ns]
Problem description
This problem is on the master branch as of commit baeb1bf
All 'nan' like entries, when converted to datetime should be NaT.
Several tests are failing, the example above is from pandas/tests/test_algos.py
Expected Output
0 1970-01-01 00:00:00.000000001
1 1970-01-01 00:00:00.000000002
2 NaT
3 NaT
4 NaT
dtype: datetime64[ns]
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: baeb1bf
python: 3.7.3.final.0
python-bits: 32
OS: Linux
OS-release: 3.18.0-19095-g86596f58eadf
machine: aarch64
processor:
byteorder: little
LC_ALL: en_US.utf8
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.25.0.dev0+761.gbaeb1bf92.dirty
pytest: 4.5.0
pip: 19.1.1
setuptools: 41.0.1
Cython: 0.29.10
numpy: 1.16.3
scipy: 1.3.0
pyarrow: None
xarray: 0.12.1
IPython: 7.5.0
sphinx: 2.0.1
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: 1.8.1
bottleneck: None
tables: 3.5.2
numexpr: 2.6.9
feather: None
matplotlib: 3.1.0
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.8
lxml.etree: 4.3.4
bs4: 4.7.1
html5lib: 0.9999999
sqlalchemy: 1.3.4
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: 0.2.2
The text was updated successfully, but these errors were encountered: