'How could mean function can directly calculate percentage rate?

enter image description here

this really confused me, how could a mean function calculate percentage rate rather than using count(vote==1) / total?

this is from DataCamp's The United Nations voting dataset

can someone explain this to me?

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source