Update gender stat to use groupby