df['data'].groupby((df['cond'] != df['cond'].shift()).cumsum()).agg([
    'count', 'mean'])[lambda x: x['count'] == x['count'].max()]
Determine mean value of ‘data’ where the highest number of CONTINUOUS cond=True