Skip to content

[WIP] Prod/Sum of all-NA / all-empty #18871

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

Closed
wants to merge 4 commits into from

Conversation

TomAugspurger
Copy link
Contributor

To make review a bit easier, I've opened this before it's complete.

Of course we still need to decide

  1. Do we want
    a. sum([]) = 0; prod([]) = 1
    b. sum([NaN]) = 0; prod([NaN]) = 1
  2. Do we like the keyword approach (requiring people who want empty to be NA to always specify it) or do we want a new method?
  3. Do we like the empty_is_na keyword? Alternatives are fill_value, ...
  4. Does this apply to groupby (unobserved categoricals)
  5. Does this apply to resample?

There are still some failing tests. I've tried to keep the commits separate:

closes #18678

@pep8speaks
Copy link

Hello @TomAugspurger! Thanks for submitting the PR.

Line 804:29: E225 missing whitespace around operator

Line 686:49: W292 no newline at end of file

Line 1058:48: W292 no newline at end of file

@jreback jreback added this to the 0.22.0 milestone Dec 20, 2017
@TomAugspurger
Copy link
Contributor Author

Superseded by #18876

@TomAugspurger TomAugspurger deleted the na-sum branch December 20, 2017 18:01
@TomAugspurger TomAugspurger restored the na-sum branch December 23, 2017 20:34
@TomAugspurger TomAugspurger deleted the na-sum branch December 29, 2017 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sum of all NA and empty should be 0
3 participants