Skip to content

Conversation

TomAugspurger
Copy link
Contributor

No description provided.

The current default is 1, reproducing the behavior of pandas 0.21. The current
test suite should pass.

Currently, only nansum and nanprod actually do anything with `min_count`. It
will not be hard to adjust other nan* methods use it if we want. This was just
simplest for now.

Additional tests for the new behavior have been added.

(cherry picked from commit dbec3c9)
@TomAugspurger TomAugspurger added this to the 0.22.0 milestone Dec 29, 2017
@TomAugspurger
Copy link
Contributor Author

cc @jreback

@jreback
Copy link
Contributor

jreback commented Dec 29, 2017

lgtm. hopefully will backport cleanly :>

@TomAugspurger
Copy link
Contributor Author

A couple builds on https://travis-ci.org/pandas-dev/pandas/builds/322879097 failed (which is just 0.21.1 + a new tag).

The error in https://travis-ci.org/pandas-dev/pandas/jobs/322879104 shouldn't be a problem since it's a conda-build thing which won't affect the wheels or conda-forge.

I'm haven't looked closely at the failures in https://travis-ci.org/pandas-dev/pandas/jobs/322879098#L1824

@jreback
Copy link
Contributor

jreback commented Dec 29, 2017

yeah those might actually be real.

@TomAugspurger
Copy link
Contributor Author

Oh, whoops, I used the td.skip_if_no decorator that wasn't backported (nanprod was used in 1.10.0). I'll just push a commit here that does it manually.

I'll look into those other failures too.

TomAugspurger and others added 3 commits December 29, 2017 15:13
* API: Change the sum of all-NA / all-Empty sum / prod

* Max, not min

* Update whatsnew

* Parametrize test

* Minor cleanups

* Refactor skipna_alternative

* Split test

* Added issue

* More updates

* linting

* linting

* Added skips

* Doc fixup

* DOC: More whatsnew

(cherry picked from commit dedfce9)
[ci skip]

(cherry picked from commit 4ed58d9)
@TomAugspurger
Copy link
Contributor Author

I messed up the backport earlier since a test_categorical.py was split. Should be fixed now.

buf = compat.StringIO()
df2.info(buf=buf)

def test_groupby_sort(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and test_groupby were moved to tests/categorical/test_groupby.py. test_groupby was updated for the API change.

It wasn't backported, so we use pytest directly.
These are already skipped for NumPy>=1.12, and buggy for NumPy
1.10.4

(cherry picked from commit 94ebca0)
@codecov
Copy link

codecov bot commented Dec 29, 2017

Codecov Report

Merging #18986 into 0.22.x will decrease coverage by 0.03%.
The diff coverage is 98.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           0.22.x   #18986      +/-   ##
==========================================
- Coverage   91.33%   91.29%   -0.04%     
==========================================
  Files         156      156              
  Lines       51835    51871      +36     
==========================================
+ Hits        47344    47357      +13     
- Misses       4491     4514      +23
Flag Coverage Δ
#multiple 89.17% <98.5%> (-0.02%) ⬇️
#single 40.15% <40.29%> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/core/nanops.py 96.68% <100%> (+0.01%) ⬆️
pandas/core/resample.py 96.38% <100%> (+0.03%) ⬆️
pandas/core/generic.py 92.46% <100%> (+0.01%) ⬆️
pandas/core/groupby.py 92.11% <100%> (+0.05%) ⬆️
pandas/util/testing.py 81% <90%> (+0.08%) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_converter.py 64.73% <0%> (-1.75%) ⬇️
pandas/core/frame.py 97.75% <0%> (-0.1%) ⬇️
pandas/core/series.py 94.91% <0%> (-0.1%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bb204a...0312ea9. Read the comment docs.

@TomAugspurger TomAugspurger merged commit 8abe8c2 into pandas-dev:0.22.x Dec 30, 2017
@TomAugspurger TomAugspurger deleted the 0.22.0-backports branch December 30, 2017 01:28
@jreback
Copy link
Contributor

jreback commented Dec 30, 2017

you might need to add: 9c1071b to make the CI pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants