-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
diff of datetime column with NaT does not result into TimeDelta #17837
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
This seems like an easy issue to fix, I can create a PR if this is indeed confirmed. |
Can you try on master? There's a chance this is fixed by some of the recent inference changes, if it isn't not a PR would be welcome |
I'm building it now... but |
Confirmed.
Output of
|
Strangely, the following works correctly:
|
So it seems that if the datetime is inside of
|
@michalsustr what do you think is wrong here? |
It seems the issue is now fixed, at least for pandas |
can u do a PR with some validation tests? |
Code Sample, a copy-pastable example if possible
Problem description
Operation - on datetimes should always return a timedelta.
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.10.0-35-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 36.2.7
Cython: None
numpy: 1.13.3
scipy: 0.19.0
xarray: None
IPython: 6.0.0
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: 1.1.14
pymysql: None
psycopg2: 2.7.3 (dt dec pq3 ext lo64)
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: