Ich habe eine df, die wie diese unten und nicht funktioniertAnova in Python Scipy verwenden, ohne
Ens_prot_ID Ens_gene_ID Sample TPM ppm ppm/TPM
0 ENSP00000416240 ENSG00000109072 liver 2540.4 0.003 0.000001
21597 ENSP00000226218 ENSG00000109072 liver 2540.4 110.000 0.043300
...
Der Code sieht gibt "KeyError: 0"
from scipy import stats
proteins=df['Ens_prot_ID'].unique()
stats.f_oneway([df[df['Ens_prot_ID'] == prot]['ppm/TPM'] for prot in proteins])
ich habe kein Problem läuft
from scipy import stats
proteins=df['Ens_prot_ID'].unique()
for prot in proteins:
df[df['Ens_prot_ID'] == prot]['ppm/TPM']
So ist es scheint, als ob das Problem ist f_oneway() nicht die Form der Eingabe mag. Gibt es eine Möglichkeit, die Funktion dazu zu bringen, Gruppennamen zu akzeptieren, die nicht von Hand eingegeben werden?