Skip to content

BUG: prevent overflowing diffs raising error in cut (#26045) #26063

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

Merged
merged 6 commits into from
Apr 19, 2019

Conversation

Batalex
Copy link
Contributor

@Batalex Batalex commented Apr 12, 2019

I added a relevant test with the example reported in the issue in \tests\reshape\test_cut.py.
I also tested with grep -rn pandas -e 'np.diff(bins' if we could have a similar situation elsewhere but it does not seem so.

I will merge upstream & add changelog entry.

Edit: whatsnew entry added & no need to merge master

@codecov
Copy link

codecov bot commented Apr 12, 2019

Codecov Report

Merging #26063 into master will decrease coverage by 51.15%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #26063       +/-   ##
===========================================
- Coverage   91.89%   40.73%   -51.16%     
===========================================
  Files         175      175               
  Lines       52493    52493               
===========================================
- Hits        48239    21384    -26855     
- Misses       4254    31109    +26855
Flag Coverage Δ
#multiple ?
#single 40.73% <0%> (-0.14%) ⬇️
Impacted Files Coverage Δ
pandas/core/reshape/tile.py 11.04% <0%> (-86.63%) ⬇️
pandas/io/formats/latex.py 0% <0%> (-100%) ⬇️
pandas/io/sas/sas_constants.py 0% <0%> (-100%) ⬇️
pandas/core/groupby/categorical.py 0% <0%> (-100%) ⬇️
pandas/tseries/plotting.py 0% <0%> (-100%) ⬇️
pandas/tseries/converter.py 0% <0%> (-100%) ⬇️
pandas/io/formats/html.py 0% <0%> (-99.37%) ⬇️
pandas/io/sas/sas7bdat.py 0% <0%> (-91.16%) ⬇️
pandas/io/sas/sas_xport.py 0% <0%> (-90.1%) ⬇️
pandas/core/tools/numeric.py 10.44% <0%> (-89.56%) ⬇️
... and 131 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 835d6f0...bf0d2ac. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 12, 2019

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26063      +/-   ##
==========================================
- Coverage   91.99%   91.98%   -0.01%     
==========================================
  Files         175      175              
  Lines       52384    52384              
==========================================
- Hits        48189    48185       -4     
- Misses       4195     4199       +4
Flag Coverage Δ
#multiple 90.53% <100%> (ø) ⬆️
#single 40.74% <0%> (-0.13%) ⬇️
Impacted Files Coverage Δ
pandas/core/reshape/tile.py 97.67% <100%> (ø) ⬆️
pandas/io/gbq.py 75% <0%> (-12.5%) ⬇️
pandas/core/frame.py 96.9% <0%> (-0.12%) ⬇️

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 8b60ebb...ddfb93e. Read the comment docs.

@mroeschke mroeschke added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Apr 12, 2019
Copy link
Member

@jschendel jschendel left a comment

Choose a reason for hiding this comment

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

Thanks! A couple small comments.

@Batalex
Copy link
Contributor Author

Batalex commented Apr 17, 2019

@jreback are we good on assert_index_equal? Even though I resolved the requested changes, GH still shows red

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.

tiny comments, ping on green.

@jreback jreback added this to the 0.25.0 milestone Apr 17, 2019
@Batalex
Copy link
Contributor Author

Batalex commented Apr 17, 2019

@jreback All good, I also merged upstream. Thanks for your time & patience !

@jreback jreback merged commit ecbb0ef into pandas-dev:master Apr 19, 2019
@jreback
Copy link
Contributor

jreback commented Apr 19, 2019

thanks @Batalex nice patch & responsiveness. keep em coming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pandas.cut incorrectly raises a ValueError due to an overflow
4 participants