I have a dataframe with exposure episodes per case:
using DataFrames using Dates df = DataFrame(id = [1,1,2,3], startdate = [Date(2018,3,1),Date(2019,4,2),Dat