I have a data set containing the following:
And I need to calculate the mean of the duration column only for Jan and Conditions Yes. I tried this but it is not giving the correct value
Jan_Mean = np.where((df['Date']=="Jan") & (df['Condition']=="Yes"), df["Duration"],0).mean()