Skip to content

Commit 1a29c6f

Browse files
committed
BUG: 32-bit compatibility
1 parent 1b4fbdf commit 1a29c6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tools/merge.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,13 @@ def _right_outer_join(x, y, max_groups):
342342
def _factorize_int64(left_index, right_index, sort=True):
343343
rizer = lib.Int64Factorizer(max(len(left_index), len(right_index)))
344344

345+
# 32-bit compatibility
346+
if left_index.dtype != np.int64: # pragma: no cover
347+
left_index = left_index.astype('i8')
348+
349+
if right_index.dtype != np.int64: # pragma: no cover
350+
right_index = right_index.astype('i8')
351+
345352
llab, _ = rizer.factorize(left_index)
346353
rlab, _ = rizer.factorize(right_index)
347354

0 commit comments

Comments
 (0)