My data frame has the customerID, product and date. I need to create a column that generates a transaction id everytime the customerID or the date changes.
My dataframe currently looks like:
- CustomerID-Product--date
- 23-------------abv-------12-12-14
- 23-------------gfs--------12-12-14
- 18-------------gra--------12-12-14
- 52-------------wer--------14-12-14
- 23-------------qwe-------16-12-14
I need the transactionID column to get populated using r
- CustomerID-Product--date----------transactionID
- 23-------------abv-------12-12-14----1
- 23-------------gfs--------12-12-14----1
- 18-------------gra-------12-12-14----2
- 52-------------wer-------14-12-14----3
- 23-------------qwe------16-12-14----4
I have the data in a csv file. I am not able to create this column in excel as the file is too big and excel is unable to open the entire file.
Thank you for your help!