How do I get the average from multiple rows where column stage = 2.
At the moment I am using
average = df.loc[df.Stage == 2,'Vout'].mean()
However, this returns an average based off the entire column.
I want to have multiple average values based off certain rows, as there is multiple blocks of data.
Any help would be great! Thanks.
