[Pandas-dev] [pydata] Feedback request for return value of empty or all-NA sum (0 or NA?)
Pietro Battiston
me at pietrobattiston.it
Fri Dec 8 08:36:04 EST 2017
Il giorno ven, 08/12/2017 alle 12.19 +0000, Jeff Reback via Pandas-dev
ha scritto:
> [...]
> Changing this behavior shakes the core tenants of pandas, suddenly we
> have a special case
> where NaN propagation is not important anymore and worse you may get
> wrong answers.
Having to do with tons of NaNs every day, I understand your concerns,
but I see only one solution to your problems, "skipna=False".
> I would argue that the folks who want guaranteed zero for all-NaN,
> can simply fill first. The reverse operation is simply
> not possible, nor desired in any actual real world scenario.
Isn't it skipna=False?!
>
> Pandas is not about strictly mathematical purity, rather about real
> world utility.
Sure utility matters, but I think consistency helps avoiding surprises,
which is very useful, in particular in the middle of a huge API.
Pietro
More information about the Pandas-dev
mailing list