df = pd.DataFrame(
{
"B": [1, None, 3],
"C": pd.array([1, None, 3], dtype="Int64"),
}
)
result = df.skew()
>>> result
B <NA>
C <NA>
dtype: Float64
>>> df[["B"]].skew()
B NaN
dtype: float64
Based on test_mixed_reductions. The presence of column "C" shouldn't affect the result we get for column "B".
Comment From: rhshadrach
Expected Behavior
NA
I would expect Float64
dtype with NaN
and NA
. One might also argue object, but so far it appears we coerce to the nullable dtypes.
df = pd.DataFrame(
{
"B": [1, 2, 3],
"C": pd.array([1, 2, 3], dtype="Float64"),
}
)
print(df.sum())
# B 6.0
# C 6.0
# dtype: Float64
Comment From: jbrockmendel
Hah, in the expected behavior section i put "NA" to mean "I'm not writing anything here", not pd.NA.