0

I need to create group ids by end-value criteria in column 'event'. The data represents customer purchase journey and for each user that journey needs to be broken into sub-journeys that end with a purchase. Each of the sub-journeys needs to have an id and that's the part I can't figure out. Any help would be appreciated! Here is an example of a data frame I am working with: sample data frame

and here is the output I am looking for:

desired output

0 Answers0