I have gone through this error as the gender is not a number we are unable to find out the mean we can solve this by converting it into the number   
I have gone through this error as the gender is not a number we are unable to find out the mean we can solve this by converting it into the number