-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
doc/source/whatsnew/v0.22.0.txt
Outdated
@@ -94,6 +94,7 @@ Documentation Changes | |||
Bug Fixes | |||
~~~~~~~~~ | |||
|
|||
- BUG: fillna maximum recursion depth exceeded in cmp (GH18159). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18385 +/- ##
==========================================
+ Coverage 91.58% 91.58% +<.01%
==========================================
Files 153 153
Lines 51250 51250
==========================================
+ Hits 46935 46938 +3
+ Misses 4315 4312 -3
Continue to review full report at Codecov.
|
doc/source/whatsnew/v0.21.1.txt
Outdated
@@ -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`). |
There was a problem hiding this comment.
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?)
pandas/core/internals.py
Outdated
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
can you rebase |
c21485f
to
7474a3b
Compare
I've implemented changes you've requested. |
doc/source/whatsnew/v0.21.1.txt
Outdated
@@ -56,6 +56,8 @@ Documentation Changes | |||
|
|||
Bug Fixes | |||
~~~~~~~~~ | |||
- Bug in :meth:`fillna` where maximum recursion depth gets exceeded in comparison (:issue:`18159`). |
There was a problem hiding this comment.
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.
pandas/core/internals.py
Outdated
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)) |
There was a problem hiding this comment.
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
Hello @kchomski-reef! Thanks for updating the PR.
Comment last updated on December 08, 2017 at 16:57 Hours UTC |
Changes applied as requested. |
There was a problem hiding this 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.
doc/source/whatsnew/v0.21.1.txt
Outdated
@@ -56,6 +56,8 @@ Documentation Changes | |||
|
|||
Bug Fixes | |||
~~~~~~~~~ | |||
- Bug in :meth:`Series.fillna` which was raising RuntimeError when got large integer (:issue:`18159`). |
There was a problem hiding this comment.
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
fe7360c
to
ef61aa4
Compare
can you rebase and fixup |
checks green |
thanks @gkonefal-reef |
…s-dev#18385) (cherry picked from commit 27a64b2)
(cherry picked from commit 27a64b2)
git diff upstream/master -u -- "*.py" | flake8 --diff