如何配对属于相同日期和时间范围的两个Boolean
。在ids
和StartTime
连接中具有相同的日期和几乎相同的时间(相差30秒)。
输入数据:
EndTime
预期产出:
bd5a4d8305ee951499c12b9da67d8518,2010-03-08 17:07:32.012002,2010-03-08 17:09:18.917441
85c5acd19a304c4b209f7b9f3dcff284,2010-03-08 17:07:31.924119,2010-03-08 17:07:51.083576
b4d39aa2f5997ffb5829c4f7c5823485,2010-03-08 17:07:28.226588,2010-03-12 16:09:58.122987
a10fd3a84ea58c998404c82d036cabeb,2010-03-08 17:07:27.549635,2010-03-12 16:09:58.122987
05d4b726f41268aea1bede2db213dcc6,2010-03-08 17:07:25.703349,2010-03-12 16:09:58.122987
e28e7b8b1c6b9c13808fa1137cf18e7b,2010-03-08 17:07:15.585748,2010-03-12 16:09:58.122987
c2b4dc9d47e7453c2bd117f23805f194,2010-03-08 17:07:11.898081,2010-03-12 16:09:58.122987
79005606569620be06f7b073c42bf65f,2010-03-08 17:06:49.592932,2010-03-12 16:09:58.122987
d76939f92a546e0369422c70f6cb1d0f,2010-03-08 17:06:30.368827,2010-03-12 16:09:58.122987
43d8ed58e5ba0a5dd6dbf917c26ea7b4,2010-03-08 17:06:07.884841,2010-03-12 16:09:58.122987
43e75786741c852b338c1e481d0d7029,2010-03-08 17:06:07.293614,2010-03-12 16:09:58.122987
配对具有相同日期时间的bd5a4d8305ee951499c12b9da67d8518,b4d39aa2f5997ffb5829c4f7c5823485,2010-03-08 17:07:32.012002,2010-03-08 17:09:18.917441
a10fd3a84ea58c998404c82d036cabeb,05d4b726f41268aea1bede2db213dcc6,2010-03-08 17:07:27.549635,2010-03-12 16:09:58.122987
e28e7b8b1c6b9c13808fa1137cf18e7b,c2b4dc9d47e7453c2bd117f23805f194,2010-03-08 17:07:15.585748,2010-03-12 16:09:58.122987
79005606569620be06f7b073c42bf65f,d76939f92a546e0369422c70f6cb1d0f,2010-03-08 17:06:49.592932,2010-03-12 16:09:58.122987
43d8ed58e5ba0a5dd6dbf917c26ea7b4,43e75786741c852b338c1e481d0d7029,2010-03-08 17:06:07.884841,2010-03-12 16:09:58.122987
(最大差异为60秒或1分钟)。
当开始和结束日期和时间相同时,可以找到该对,但当它们略有不同时,四舍五入似乎很难。
我确实试着查看python教程,并尝试在这里找到一些例子,但似乎没有运气。