Let's take an example.
suppose we have a data frame that has column name "f1"

> 
> f1 : {2, 4, NaN, 1, NaN, 15}
> 
> 
> 

and when we apply mean imputation to it then we write a code like this

```
dataframe['f1'].fillna(dataframe['f1'].mean())

```

so my doubt is when it computes the mean of f1 during **dataframe['f1'].mean()** I know that it excludes the NaN value during summation(in the numerator) because they can't be added but what I want to know is it can be included or excluded in the denominator when dividing by the total number of values.

mean is computes like this

> 
> mean(f1) = (2+4+1+15)/6(include NaN in total number of values)
> 
> 
> 

or this way

> 
> mean(f1) = (2+4+1+15)/4(exclude NaN in total number of values)
> 
> 
> 

also, explain why?
thanks in advance