Skip to content
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: Interpolate limit=n GH16282 #16429

Merged
merged 5 commits into from
May 23, 2017
Merged

BUG: Interpolate limit=n GH16282 #16429

merged 5 commits into from
May 23, 2017

Conversation

WBare
Copy link
Contributor

@WBare WBare commented May 22, 2017

@codecov
Copy link

codecov bot commented May 22, 2017

Codecov Report

Merging #16429 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16429      +/-   ##
==========================================
- Coverage   90.42%   90.42%   -0.01%     
==========================================
  Files         161      161              
  Lines       51023    51023              
==========================================
- Hits        46138    46137       -1     
- Misses       4885     4886       +1
Flag Coverage Δ
#multiple 88.26% <100%> (-0.01%) ⬇️
#single 40.17% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/missing.py 84.27% <100%> (ø) ⬆️
pandas/core/common.py 91.05% <0%> (-0.34%) ⬇️

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 49ec31b...843d427. Read the comment docs.

@codecov
Copy link

codecov bot commented May 22, 2017

Codecov Report

Merging #16429 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16429   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files         161      161           
  Lines       51023    51023           
=======================================
  Hits        46138    46138           
  Misses       4885     4885
Flag Coverage Δ
#multiple 88.26% <100%> (ø) ⬆️
#single 40.17% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/missing.py 84.27% <100%> (ø) ⬆️
pandas/core/reshape/merge.py 94.18% <0%> (-0.01%) ⬇️
pandas/errors/__init__.py 100% <0%> (ø) ⬆️

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 49ec31b...d3d9cb3. Read the comment docs.

@WBare
Copy link
Contributor Author

WBare commented May 22, 2017

Sorry to have to ask a general questions, but can someone explain how my code coverage can go down in a file that I have not changed?

Codecov correctly identified an uncovered return parameter from a function in common.py, but I have not modified that file.

I went ahead and added the appropriate test (which does not relate to this issue), because it was very simple to cover the case.

I just don't know why codecov is saying my branch reduces coverage in that file if I have not changed it.

@jreback jreback added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels May 23, 2017
@@ -106,6 +106,8 @@ Reshaping

Numeric
^^^^^^^
- DataFrame.interpolate was not respecting limit_direction when using the default limit=None (unlimited). Specifically, it would always use limit_direction='forward' even when limit_direction was set otherwise. Now default limit=None will work with other directions. :issue:`16282`
Copy link
Contributor

Choose a reason for hiding this comment

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

you can move this to 0.20.0. Make much shorter.

Bug in .interpolate(), where limit_direction was not respected when limit=None (default) was passed (:issue:16282)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Jeff @jreback , 2 questions:

  1. Can you give me a basic pointer on getting this into 0.20.0? i.e. is that a new pull request? Is there a way I can apply my branch to 0.20.0 (I'm just learning GitHub).

  2. What is the proper way to ping when a pull request is ready for review (all green). Just a comment?

Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think 0.20 was a typo. Probably mean 0.20.2. There's a whatsnew/v0.20.2.txt. You can move this section there (and make it a bit shorter. Typically just a sentence, and people can click on the link to the issue if they're interested in more).

And yeah, just a comment when you're ready for review, or when you notice that all the checkmarks at the bottom are green and it's ready for review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @TomAugspurger, I thought Jeff wanted me to somehow move the change to the 0.20 branch. That change is in. I will ping when green.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

minor comment. ping when pushed and green.

@jreback jreback added this to the 0.20.2 milestone May 23, 2017
@WBare
Copy link
Contributor Author

WBare commented May 23, 2017

All green. Ready for review. Thanks.

@@ -16,6 +16,7 @@ def test_mut_exclusive():
com._mut_exclusive(a=1, b=2)
assert com._mut_exclusive(a=1, b=None) == 1
assert com._mut_exclusive(major=None, major_axis=None) is None
assert com._mut_exclusive(a=None, b=2) == 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this change intentional? If not I can remove it just before merging.

@WBare
Copy link
Contributor Author

WBare commented May 23, 2017 via email

@TomAugspurger
Copy link
Contributor

@WBare thanks, more tests are good :) Just making sure it was intentional. Codecov can be a bit weird about how it counts changes.

Removed extraneous newline
@TomAugspurger
Copy link
Contributor

Just pushed a small change to remove the newline in the 0.21 file. Merging.

@TomAugspurger TomAugspurger merged commit a8a497f into pandas-dev:master May 23, 2017
@WBare WBare deleted the Fix-Interpolate-Limit-16282 branch May 23, 2017 16:02
TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request May 29, 2017
* BUG: Interpolate limit=n GH16282

* Fix: comment line over the 80 char limit

* Test: Added small test for code coverage

* DOC: Moved whats new comment from 0.21.0 to 0.20.2

* Update v0.21.0.txt

Removed extraneous newline

(cherry picked from commit a8a497f)
TomAugspurger pushed a commit that referenced this pull request May 30, 2017
* BUG: Interpolate limit=n GH16282

* Fix: comment line over the 80 char limit

* Test: Added small test for code coverage

* DOC: Moved whats new comment from 0.21.0 to 0.20.2

* Update v0.21.0.txt

Removed extraneous newline

(cherry picked from commit a8a497f)

# each possible limit_direction
if limit_direction == 'forward':
violate_limit = sorted(start_nans |
Copy link
Contributor

Choose a reason for hiding this comment

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

@TomAugspurger not sure if this is where the perf issue is (maybe because not this IS hit in all code).

these can be done via Index set ops

IOW

start_nans = Index(range(.....))

violate_limit = start_nans.union(Index(_interp_limit(invalid, limit, 0))).sort_values()

for example

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 3, 2017 via email

stangirala pushed a commit to stangirala/pandas that referenced this pull request Jun 11, 2017
* BUG: Interpolate limit=n GH16282

* Fix: comment line over the 80 char limit

* Test: Added small test for code coverage

* DOC: Moved whats new comment from 0.21.0 to 0.20.2

* Update v0.21.0.txt

Removed extraneous newline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

df.interpolate limit_direction= does not work without limit=x setting
3 participants