Count number of values in category


Sat Oct 15 2022 20:27:12 GMT+0000 (Coordinated Universal Time)

Saved by @sarfraz_sheth #python

df.groupby('is_trans').count() # group data by "is_trans" and count others var

df[['name','is_trans']].groupby('is_trans').count() # same as above but with specifi col

df.is_trans.value_counts() # count haw many time a value is repeated in a col

Haw to get the numbers of repetion of a certain value, count of register in a category things like that pivoting and etc..