title: Calculating percentage of column that's a specific string and grouping by another column
body: <p>So I have two columns in a dataframe, province &amp; profession. I need to return the % of of entries that are 'teacher' per province (ie it will return the provinces and the percentage rows for the province where profession ==&quot;teacher'.) So I know for the grouping for province part it would be using groupby(), and I'm thinking for the percentage that are teachers it would involve value counts, but I can't figure out how to get it as a percentage of entries for that province &amp; not the percent of all teacher entries, grouped by province. I have a feeling that. it's relatively straight forward, but I've been stuck for a while now. Any help would be appreciated.</p>