-
-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
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
BUG/inconsistency: pd.Series(dtype=object).sum(skipna=True) does not respect skipna=True #59764
Comments
Thanks for the report. For efficiency, pandas implements |
That makes a fair bit of sense, and works out of the box for things like the built in In the case of operations that produce scalars, like I can see what you mean for efficiency of the expanding operations like As much as I think there could be some nice performance gains, and maybe a little bit less surprise with documentation as it stands, this particularly niche case can be solved by handling That all said, as interesting as it I've found it to talk about, I don't have any real interest in promoting or working on any sort of "scalars might go faster and explicit identities for in-place ops may be faster still" or "explicit identities allow another way to do expanding". Even updating documentation feels like a bit of a stretch now as I guess this doesn't come up much, as even my case just came up from trying to hack up something into an existing project so have plenty of flexibility. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
aggregation methods over objects does not respect skipna. Exception produced above
Expected Behavior
NaN values are skipped.
Given that all-NaN values are documented to produce NaN
Installed Versions
The text was updated successfully, but these errors were encountered: