0

I detected peaks in an ECG signal and a blood pressure signal. And now I like to know the time difference between these two peaks. So I created two different dataframes with the timestamps of the peaks.

How to subtract them from each other when they have different indexes ?

peaksbloodpressure

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

peaksECG

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
Radosław Cybulski
  • 2,952
  • 10
  • 21
NienkeL
  • 1
  • 1
  • 1
    if you don't have a unique key to match a ECG line and a bloodpressure line, I don't how you'll match them :/ Maybe with line number ? – Maelig Jul 17 '19 at 08:54
  • Why dont you reset index and try, if the indexes are not significant – Fasty Jul 17 '19 at 08:57

0 Answers0