These two lines of code differ only in the parameter values that have been passed. What is unclear to me is why in the first case ("count") we need the quotation marks while in the second case (len) they weren't needed.
by_weekday1 = users.pivot_table(index='weekday', aggfunc='count')
by_weekday2 = users.pivot_table(index='weekday', aggfunc=len)
Thanks in advance!