How to find the count of consecutive same string values in a pandas dataframe?
Break col1 into sub-groups of consecutive strings. Extract first and last entry per sub-group.

Something like this:

df = pd.DataFrame({'col1':['A&gt;G','C&gt;T','C&gt;T','G&gt;T','C&gt;T', 'A&gt;G','A&gt;G','A&gt;G'],'col2':['TCT','ACA','TCA','TCA','GCT', 'ACT','CTG','ATG'], 'start':[1000,2000,3000,4000,5000,6000,10000,20000]})

df['subgroup'] = (df['col1'] != df['col1'].shift(1)).cumsum()


  col1 col2  start  subgroup
0  A&gt;G  TCT   1000         1
1  C&gt;T  ACA   2000         2
2  C&gt;T  TCA   3000         2
3  G&gt;T  TCA   4000         3
4  C&gt;T  GCT   5000         4
5  A&gt;G  ACT   6000         5
6  A&gt;G  CTG  10000         5
7  A&gt;G  ATG  20000         5


df.groupby('subgroup',as_index=False).apply(lambda x: (x['col1'].head(1),
                                                        x.shape[0],
                                                        x['start'].iloc[-1] - x['start'].iloc[0]))

0        ([A&gt;G], 1, 0)
1     ([C&gt;T], 2, 1000)
2        ([G&gt;T], 1, 0)
3        ([C&gt;T], 1, 0)
4    ([A&gt;G], 3, 14000)


Tweak as needed.