I’m doing some analysis and I have this situation:
I want to “detect” that someone (column “nomeLimpo”) has the same supervisor at the Master and Ph.D. degree. In the example below, “Adriana Luiza” has got PhD and Master (column “formacao”) with the same supervisor (id 816 at “orientacao” columnm).
Something like
if count (“formacao”) >=2 AND count(“orientacao”) == 1
I guess “formacao” and “orientacao” are reference lists to the same “persons” table ; in that case, rather than counting, wouldn’t it be easier to compare lists ?
for f in $formacao:
if f in $orientacao:
return True
return False
Otherwise, to count items in a field, you may use the len() function of Python: