How to count concurrent events in a dataframe in one line?
问题 I have a dataset with phone calls. I want to count how many active calls there are for each record. I found this question but I'd like to avoid loops and functions. Each call has a date , a start time and a end time . The dataframe: start end date 0 09:17:12 09:18:20 2016-08-10 1 09:15:58 09:17:42 2016-08-11 2 09:16:40 09:17:49 2016-08-11 3 09:17:05 09:18:03 2016-08-11 4 09:18:22 09:18:30 2016-08-11 What I want: start end date activecalls 0 09:17:12 09:18:20 2016-08-10 1 1 09:15:58 09:17:42