enter image description hereHi I have two data matrix, one is A and the other is B. I want to compare the first row of A to that of B and if a match is found in B, then the whole column(s) in B should be extracted. In the attached file, under A, 11, 12, 13 and 14 can also be found in B. In this case all the values under 11, 12, 13 and 14 in B are extracted into C. In other words, A is a row vector and I want to compare it to the first row of B.
I have the following Matlab expression that works and I would like to translate it to python:
C = B(:,ismember(B(1,:),A))
Thanks!