0

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.

itstoocold
  • 2,385
  • 2
  • 12
  • 15

1 Answers1

2

Use df['your column name'].value_counts()['your value name'].

Brad Solomon
  • 38,521
  • 31
  • 149
  • 235