I'm creating a sample dataframe to work on this problem.
import pandas as pd
import numpy as np
df = pd.DataFrame({'id': np.arange(0,16), "trend": ['in','de', 'in',
'in','in','un','de','de','un','un','de','de','in','de','in','in']})

1st: Make a list of the column named 'trend'
val = list(df['trend'])
2nd: Create a new list and add each pair of tuples into the list. Each tuple contains the first value and its consecutive next value according to the iteration.
f = val[0]
list_trend = []
for x in val[1:]:
list_trend.append((f,x))
f = x
The output list will be like this 👆

3rd: By using 'Counter', you can count occurances of each unique pair from that list.
from collections import Counter
c = Counter(list_trend)
count = c.items()
The output will be like this 👆

And that's it.....