Skip to content

Commit

Permalink
Applied requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gkonefal-reef committed Dec 3, 2017
1 parent f29a917 commit e0aef13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.21.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Documentation Changes

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


Conversion
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ def _can_hold_element(self, element):
return issubclass(tipo.type,
(np.floating, np.integer, np.complexfloating))
return (isinstance(element,
(float, int, complex, np.float_, np.int_)) and
(float, int, complex, np.float_, np.int_, compat.long)) and
not isinstance(element, (bool, np.bool_)))

def should_store(self, value):
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/internals/test_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,7 @@ class TestCanHoldElement(object):
(1.0, 'f8'),
(2**63, 'f8'),
(1j, 'complex128'),
(2**63, 'complex128'),
(True, 'bool'),
(np.timedelta64(20, 'ns'), '<m8[ns]'),
(np.datetime64(20, 'ns'), '<M8[ns]'),
Expand Down

0 comments on commit e0aef13

Please sign in to comment.