Is it better to impute a feature with single value or impute based on frequency? Last time I posted a question in Stackoverflow how to fill nans based on frequency.
I got some comments about whether it is a good idea or not. So I am seeking some suggestions if this is actually a good idea or not here in Cross Validated.
My Post in stackoverflow:

*

*https://stackoverflow.com/questions/63548053/python-fill-missing-values-according-to-frequency?noredirect=1#comment112380190_63548053
Let's say I am doing a binary classification and I have a feature called "sex" with some missing values.
Is it better to fill nans with mode or fill nans with frequency?
import numpy as np
import pandas as pd


df = pd.DataFrame({'sex': [1,1,1,1,0,0,np.nan,np.nan,np.nan]})
df['sex_fillna'] = df['sex'].fillna(df.sex.mode()[0])
print(df)
   sex  sex_fillna_mode   sex_fillna_freq
0  1.0         1.0        1.0
1  1.0         1.0        1.0
2  1.0         1.0        1.0
3  1.0         1.0        1.0
4  0.0         0.0        0.0
5  0.0         0.0        0.0
6  NaN         1.0        1.0
7  NaN         1.0        1.0
8  NaN         1.0        0.0  

# Here, we have 4 males and 2 females. 
# We have 3 missing values.
# I have filled 2 missing values with 1.0
# and one missing value with 0.0.
# Is this a better idea?

Which option is better feature sex_fillna_mode or sex_fillna_freq?
Update
The missing value imputation depends on how the missing values are generated in the first place such as missing at random, systematic no response to certain questions and so on. Here, I am unknown with the data generation process and working with the data as provided. I am trying to build a classification model, but one of the features "sex" has some nans and I was exploring ways to impute the missing values.
Usually, for a given column, we fill NaNs with only one value (eg. mean or median or "Unknown" etc). But my question here is "is there anything harm filling missing values with more than one values for a single column?"
 A: 
is there anything harm filling missing values with more than one values for a single column?

No. In fact, you should not just fill in missing values with potentially different values within a single column, you should do so repeatedly to get multiple versions of imputed data sets. That's the correct way to avoid bias or incorrect standard errors when dealing with missing data.
Section 1.3 of Stef van Buuren's book examines several approaches for filling in missing data, discussing the conditions under which they can produce unbiased results and give correct standard errors when you only generate one data set with imputations. Except under specific circumstances they have substantial problems.
The best approach is to use a probabilistic estimation of the missing values, based on the other information you have about the cases, and repeat the process several times to get multiple imputed data sets. With sex having missing values, you could use methods based on logistic regression to combine information available from the relationships of the other predictors and of the outcome values with sex. You then do the analysis separately on each of the imputed data sets, and combine the results across the imputations. In that way you correctly incorporate the uncertainty that comes from both the modeling itself and the imputation process. See the book for details, and the mice package in R for one implementation.
