Skip to content

Commit de28617

Browse files
author
Krzysztof Chomski
committed
BUG: fillna maximum recursion depth exceeded in cmp (GH18159).
1 parent 7b5ca80 commit de28617

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/internals.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,8 +1837,9 @@ def _can_hold_element(self, element):
18371837
if tipo is not None:
18381838
return (issubclass(tipo.type, (np.floating, np.integer)) and
18391839
not issubclass(tipo.type, (np.datetime64, np.timedelta64)))
1840-
return (isinstance(element, (float, int, np.floating, np.int_)) and
1841-
not isinstance(element, (bool, np.bool_, datetime, timedelta,
1840+
return (
1841+
isinstance(element, (float, int, np.floating, np.int_, np.long))
1842+
and not isinstance(element, (bool, np.bool_, datetime, timedelta,
18421843
np.datetime64, np.timedelta64)))
18431844

18441845
def to_native_types(self, slicer=None, na_rep='', float_format=None,

0 commit comments

Comments
 (0)