Here are the two series. They were generated after grouping a dataframe based on two column values, patient_id
and event_description
:
Series 1:
patient_id event_description
A DiagnosisA 2016-09-15
B DiagnosisA 2013-01-01
C DiagnosisA 2016-01-10
D DiagnosisA 2015-01-02
Series 2:
patient_id event_description
A DiagnosisB 2016-09-30
B DiagnosisB 2013-01-04
D DiagnosisB 2015-01-15
So I essentially Would like to find the difference in time between between each patient. For example for patient A
it would return 15 days but for patient C
, It could say `NaN.