Q:

How to compare 2 columns of 2 different dataframes pandas, and sum the result pandas

I have 2 dataframes with the same length, but different number of columns. 
I'd like to compare 2 specific columns from those dataframes and if the values are even, the counter is added by 1, like so:
df1:
count = o

       num
0        0
1        1
2        0
3        0
4        1

df2:
     Preg      Glu  outcome  
0     5.0    116.0      0.0      
1    10.0    115.0      0.0      
2     2.0    197.0      0.0      
3     7.0    196.0      1.0        
4    10.0    125.0      1.0

Thus, since they were even in 3 values, the result should be:
count = 3

What is the best way to do that?

A:

You can check by performing an elementwise comparison between the two:
>>> (df1['num'] == df2['outcome']).sum()
3

