Counting matches won by teams
condition a &gt; 0 and b &gt; 0 or a &lt; 0 and b &lt; 0 often can be write as a * b &gt; 0 (it depends on multiply cost)
maybe you can use it something as total_win = ( poss_diff.Points * poss_diff.Total &gt; 0 )
len(poss_diff[total_win]) can be translate to total_win.sum()