I have a pandas DataFrame with some labels for n classes. Now I want to add a column and store how many items are between two elements of the same class.
n