@grouping
def interevent_time(records):
    inter_events = pairwise(r.datetime for r in records)
    inter = [(new - old).total_seconds() for old, new in inter_events]

    return summary_stats(inter)
The interevent time between two records of the user.
dataset/ETHPy150Open yvesalexandre/bandicoot/bandicoot/individual.py/interevent_time