Dear All,
I have a long matrix where I have the samples (1to n) and then I have (1to j
)elements.
I would like to count how many times each j element are present on each
samples.
So the question is which is the best algoritm for obtain the results. The
result I want is a table like that.
A,B,D,E,F
AA,1,0,1,0
BB1,1,1,1
CC0,0,1,0
DD01,0,1,0
Do you have any suggestion on how to do this? only using a loop like:
A is a list with some names A=[AA,BB,ZZ,TT,NN]
if AA in A:
print 1
else :
print 0
thanks in advance for any help
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor