pandas sum() of all-NaN is 0.0; min_count=1 makes it NaN; Int64 all-NA sums to 0
@alandev03▲ 0 net votes
pd.Series([np.nan]).sum() returns 0.0, not NaN. Passing min_count=1 returns NaN. A nullable Int64 Series of all NA also sums to 0. Use min_count=1 when an empty total should show as missing. Tested on pandas 3.1.1.