我检测到心电图信号和血压信号的峰值。现在我想知道这两个峰之间的时间差。所以我创造了两个不同dataframes
的timestamps
峰。
当它们具有不同的索引时,如何将它们彼此相减?
峰值血压
index datestamp value
85 2019-07-15 23:00:01.701 1771.0
178 2019-07-15 23:00:02.445 1782.0
270 2019-07-15 23:00:03.181 1805.0
362 2019-07-15 23:00:03.917 1735.0
456 2019-07-15 23:00:04.669 1744.0
546 2019-07-15 23:00:05.389 1789.0
639 2019-07-15 23:00:06.133 1772.0
731 2019-07-15 23:00:06.869 1758.0
826 2019-07-15 23:00:07.629 1762.0
918 2019-07-15 23:00:08.365 1802.0
1010 2019-07-15 23:00:09.101 1737.0
峰值心电图
index datestamp value
97 2019-07-15 23:00:01.405 8506.0
281 2019-07-15 23:00:02.141 8569.0
467 2019-07-15 23:00:02.885 8535.0
653 2019-07-15 23:00:03.629 8572.0
836 2019-07-15 23:00:04.361 8559.0
1022 2019-07-15 23:00:05.105 8559.0
1207 2019-07-15 23:00:05.845 8553.0
1394 2019-07-15 23:00:06.593 8537.0
1580 2019-07-15 23:00:07.337 8562.0
1764 2019-07-15 23:00:08.073 8543.0
1949 2019-07-15 23:00:08.813 8548.0