有没有人遇到过类似的情况,如下所示,如果让aa为Timestamp,b为be datetime64,则比较a < b很好,但b < a返回错误。如果a可以比较b,我想我们应该可以反过来比较吗?例如(Python 2.7):>>> aTimestamp('2013-03-24 05:32:00')>>> bnumpy.datetime64('2013-03-23T05:33:00.000000000')>>> a < bFalse>>> b < aTraceback (most recent call last): File "<input>", line 1, in <module> File "pandas\_libs\tslib.pyx", line 1080, in pandas._libs.tslib._Timestamp.__richcmp__ (pandas\_libs\tslib.c:20281)TypeError: Cannot compare type 'Timestamp' with type 'long'提前谢谢了!
添加回答
举报
0/150
提交
取消