首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Numpy:检查值是否为NaT

Numpy:检查值是否为NaT
EN

Stack Overflow用户
提问于 2016-07-22 00:25:01
回答 3查看 133.6K关注 0票数 61
nat = np.datetime64('NaT')
nat == nat
>> FutureWarning: In the future, 'NAT == x' and 'x == NAT' will always be False.

np.isnan(nat)
>> TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

如何检查datetime64是否为NaT?我好像从文档里找不出什么东西来。我知道Pandas可以做到这一点,但我不想为这么简单的东西添加依赖。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38509538

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档