I have a situation where my dataset has a column which consists of the full sequence of directed google Analytics user page pathways(I.e. sequence of pages/nodes in chain). Is there a function/library or trick to convert that sequence into individual rows representing edges (i.e a directed pair of node/user pages) ?
My scenario(the full sequence column has values like) :
A->B->C
C->D
A->X
Z
I expect a output like below after processing:
A->B
B->C
C->D
A->X
Z-> Null ---- this represents that it is a leaf node also meaning that the user has reached the last page of his journey and there exists no next node/page in his journey