Skip to content

BUG: fillna maximum recursion depth exceeded in cmp (GH18159). #18385

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 4 commits into from
Dec 9, 2017

Conversation

ghost
Copy link

@ghost ghost commented Nov 20, 2017

@@ -94,6 +94,7 @@ Documentation Changes
Bug Fixes
~~~~~~~~~

- BUG: fillna maximum recursion depth exceeded in cmp (GH18159).
Copy link
Contributor

Choose a reason for hiding this comment

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

Format the issue like

:issue:`18159`

so that the link is rendered;.

Also, you can move this to 0.21.1 since it's a bugfix.

Copy link
Author

Choose a reason for hiding this comment

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

Done.

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #18385 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18385      +/-   ##
==========================================
- Coverage   91.36%   91.34%   -0.02%     
==========================================
  Files         164      164              
  Lines       49718    49718              
==========================================
- Hits        45426    45417       -9     
- Misses       4292     4301       +9
Flag Coverage Δ
#multiple 89.14% <100%> (ø) ⬆️
#single 39.61% <100%> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/core/internals.py 94.54% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.8% <0%> (-0.1%) ⬇️

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 1647a72...7380624. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #18385 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18385      +/-   ##
==========================================
+ Coverage   91.58%   91.58%   +<.01%     
==========================================
  Files         153      153              
  Lines       51250    51250              
==========================================
+ Hits        46935    46938       +3     
+ Misses       4315     4312       -3
Flag Coverage Δ
#multiple 89.44% <100%> (+0.02%) ⬆️
#single 40.67% <100%> (-0.11%) ⬇️
Impacted Files Coverage Δ
pandas/core/internals.py 94.44% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.81% <0%> (-0.1%) ⬇️
pandas/plotting/_converter.py 65.25% <0%> (+1.81%) ⬆️

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 c3c04e2...03b2f6b. Read the comment docs.

@gfyoung gfyoung added 2/3 Compat Bug Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Nov 20, 2017
@@ -64,6 +64,7 @@ Bug Fixes
- Bug in ``pd.concat`` when empty and non-empty DataFrames or Series are concatenated (:issue:`18178` :issue:`18187`)
- Bug in :class:`IntervalIndex` constructor when a list of intervals is passed with non-default ``closed`` (:issue:`18334`)
- Bug in :meth:`IntervalIndex.copy` when copying and ``IntervalIndex`` with non-default ``closed`` (:issue:`18339`)
- Bug in :meth:`fillna` maximum recursion depth exceeded in cmp (:issue:`18159`).
Copy link
Member

Choose a reason for hiding this comment

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

"where maximum recursion depth gets exceeded"

Also, instead of "cmp", replace it with something more reader-friendly (I presume this is comparison?)

not isinstance(element, (bool, np.bool_, datetime, timedelta,
return (
isinstance(element, (float, int, np.floating, np.int_, np.long))
and not isinstance(element, (bool, np.bool_, datetime, timedelta,
Copy link
Contributor

Choose a reason for hiding this comment

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

use long from pandas.compat

Copy link
Contributor

Choose a reason for hiding this comment

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

another location need to be changed

see #18399

@jreback
Copy link
Contributor

jreback commented Nov 22, 2017

can you rebase

@gkonefal-reef gkonefal-reef force-pushed the 18159 branch 3 times, most recently from c21485f to 7474a3b Compare November 22, 2017 19:28
@gkonefal-reef
Copy link
Contributor

I've implemented changes you've requested.

@@ -56,6 +56,8 @@ Documentation Changes

Bug Fixes
~~~~~~~~~
- Bug in :meth:`fillna` where maximum recursion depth gets exceeded in comparison (:issue:`18159`).
Copy link
Contributor

Choose a reason for hiding this comment

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

make this friendly from a user perspective, eg. a reader of the release notes should understand that doing X is now fixed.

return (isinstance(element, (float, int, np.floating, np.int_)) and
not isinstance(element, (bool, np.bool_, datetime, timedelta,
return (
isinstance(element, (float, int, np.floating, np.int_, compat.long))
Copy link
Contributor

Choose a reason for hiding this comment

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

there is another section where you need to add this (in _can_hold_element), in ComplexBlock, also can you add a test which hits that as well

@pep8speaks
Copy link

pep8speaks commented Dec 3, 2017

Hello @kchomski-reef! Thanks for updating the PR.

Line 1853:13: W503 line break before binary operator
Line 1905:13: W503 line break before binary operator

Comment last updated on December 08, 2017 at 16:57 Hours UTC

@gkonefal-reef
Copy link
Contributor

Changes applied as requested.

@jreback jreback added this to the 0.21.1 milestone Dec 3, 2017
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.

doc change, ping when green.

@@ -56,6 +56,8 @@ Documentation Changes

Bug Fixes
~~~~~~~~~
- Bug in :meth:`Series.fillna` which was raising RuntimeError when got large integer (:issue:`18159`).
Copy link
Contributor

Choose a reason for hiding this comment

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

move this to Conversions section.

Bug in :meth:`Series.fillna` which raised when passed a long integer on Python 2

@gkonefal-reef gkonefal-reef force-pushed the 18159 branch 3 times, most recently from fe7360c to ef61aa4 Compare December 5, 2017 13:26
@jreback
Copy link
Contributor

jreback commented Dec 8, 2017

can you rebase and fixup

@jreback jreback removed this from the 0.21.1 milestone Dec 8, 2017
@gkonefal-reef
Copy link
Contributor

checks green

@jreback jreback added this to the 0.21.1 milestone Dec 9, 2017
@jreback jreback merged commit 27a64b2 into pandas-dev:master Dec 9, 2017
@jreback
Copy link
Contributor

jreback commented Dec 9, 2017

thanks @gkonefal-reef

TomAugspurger pushed a commit to TomAugspurger/pandas that referenced this pull request Dec 11, 2017
TomAugspurger pushed a commit that referenced this pull request Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: fillna maximum recursion depth exceeded in cmp
5 participants