We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variance calculation Series.var() is ignoring the ddof argument for nullable integer type Int64. Behavior should match that of float type.
Series.var()
ddof
Int64
float
>>> 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
The text was updated successfully, but these errors were encountered:
@VictorDavis thanks for the report! From a quick look, it seems the argument is not passed through, here:
pandas/pandas/core/arrays/integer.py
Line 655 in 6c898e6
Sorry, something went wrong.
BUG: Issue #29128 Series.var not returning the correct result (#29353)
0485115
BUG: Issue pandas-dev#29128 Series.var not returning the correct resu…
07a5d4c
…lt (pandas-dev#29353)
0b688c0
Successfully merging a pull request may close this issue.
Variance calculation
Series.var()
is ignoring theddof
argument for nullable integer typeInt64
. Behavior should match that offloat
type.The text was updated successfully, but these errors were encountered: