if this is the source code.. how will you edit the f_oneway function line such that you dont have to manually specify the archer name each time
import numpy as np
from scipy import stats
data = np.rec.array([
('Pat', 5),
('Pat', 4),
('Pat', 4),
('Pat', 3),
('Pat', 9),
('Pat', 4),
('Jack', 4),
('Jack', 8),
('Jack', 7),
('Jack', 5),
('Jack', 1),
('Jack', 5),
('Alex', 9),
('Alex', 8),
('Alex', 8),
('Alex', 10),
('Alex', 5),
('Alex', 10)], dtype = [('Archer','|U5'),('Score', '<i8')])
f, p = stats.f_oneway(data[data['Archer'] == 'Pat'].Score,
data[data['Archer'] == 'Jack'].Score,
data[data['Archer'] == 'Alex'].Score)
print ('P value:', p, '\n')
I tried the following but it errors out saying 'no field of name Pat'
f, p = stats.f_oneway(data[data['Archer']].Score)
help!