I have a simple dataframe.
SITE OPERTN
152 R1H12 V011
200 RR801 V014
342 RM301 V011
375 RTH08 V011
469 RYJ02 V011
... ... ...
634503 RRK15 V011
634763 RRVNQ V014
635237 R1H12 V011
635512 RTH08 V011
635548 RJE01 V011
4689 rows × 2 columns
I want to convert this to a simple spreadsheet type table of:
site V011 V012 V014
R1H12 count count count
RR801 count count count
RM301 count count count
RTH08 count count count
etc
I have tried pivoting it, and pivot_table but can't get the agfunc=sum
to do it.