Variance of nullable Int64 ignores ddof argument (original) (raw)

Variance calculation Series.var() is ignoring the ddof argument for nullable integer type Int64. Behavior should match that of float type.

pd.version '0.25.1' np.version '1.17.2' s1 = pd.Series(data=[1,2,3,4,5,6,np.nan,np.nan]) series.var(ddof=0) 3.5 s1 = pd.Series(data=[1,2,3,4,5,6,np.nan,np.nan]) s1.var(ddof=0) 2.9166666666666665 s1.var(ddof=1) 3.5 s2 = pd.Series(data=[1,2,3,4,5,6,np.nan,np.nan], dtype="Int64") s2.var(ddof=0) 3.5 s2.var(ddof=1) 3.5