groupby the sample_id column and use mean
df.groupby('sample_id').mean().reset_index()
or
df.groupby('sample_id', as_index=False).mean()
get you

groupby the sample_id column and use mean
df.groupby('sample_id').mean().reset_index()
or
df.groupby('sample_id', as_index=False).mean()
get you
