When encoding survey data, it is customary to represent sex as a dummy variable that takes on the value of 0 for one of the sexes and 1 for the other so that when you look at the averages you can automatically see the percentage of male vs female respondents (ditto for percent employed, or percent homeowner etc etc).
I am sure the hash code was really helpful in that regard ;-)
PS:The real WTF is thinking the word 'gender' is synonymous with 'sex'.