There are three solutions offered to this exercise: https://noc-oi.github.io/python-intermediate-esces/04-data-types-and-format/index.html#counting but two of them use a for loop and seem distinctly un-pandas-esque.