Using pandas, how can I return the number of times an element appears in a column?
Use df['your column name'].value_counts()['your value name'].
I have a pandas df with 5 columns, one of them being State. I want to find the number of times each state appears in the State column. I'm guessing I might need to use groupby, but I haven't been able to figure out the exact command.