I am trying to find calculate the mean for a new column.
data['english_combined'] = data['english'] + data['intake_english'] + data['language test scores formatted']
so the english_combined column is a the sum of the other columns. I want to take the mean based on what grades are entered, example if only 'English' and 'inktake_english' have a grade I want to take the mean of these 2. if all 3 test are taken I want to take the mean of the 3 tests combined
I did try something like this with no succes
[np.mean(i,j,k) for i,j,k in zip(data['english'], data['intake_english'], data['language test scores formatted'])]
any suggestions that would work?