Skip to content

Commit e0aef13

Browse files
committed
Applied requested changes
1 parent f29a917 commit e0aef13

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

doc/source/whatsnew/v0.21.1.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Documentation Changes
5656

5757
Bug Fixes
5858
~~~~~~~~~
59-
- Bug in :meth:`fillna` where maximum recursion depth gets exceeded in comparison (:issue:`18159`).
59+
- Bug in :meth:`Series.fillna` which was raising RuntimeError when got large integer (:issue:`18159`).
6060

6161

6262
Conversion

pandas/core/internals.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@ def _can_hold_element(self, element):
18981898
return issubclass(tipo.type,
18991899
(np.floating, np.integer, np.complexfloating))
19001900
return (isinstance(element,
1901-
(float, int, complex, np.float_, np.int_)) and
1901+
(float, int, complex, np.float_, np.int_, compat.long)) and
19021902
not isinstance(element, (bool, np.bool_)))
19031903

19041904
def should_store(self, value):

pandas/tests/internals/test_internals.py

+1
Original file line numberDiff line numberDiff line change
@@ -1224,6 +1224,7 @@ class TestCanHoldElement(object):
12241224
(1.0, 'f8'),
12251225
(2**63, 'f8'),
12261226
(1j, 'complex128'),
1227+
(2**63, 'complex128'),
12271228
(True, 'bool'),
12281229
(np.timedelta64(20, 'ns'), '<m8[ns]'),
12291230
(np.datetime64(20, 'ns'), '<M8[ns]'),

0 commit comments

Comments
 (0)