Skip to content

Commit 27e92d6

Browse files
committed
Use factorizers in reshape
1 parent 899fe02 commit 27e92d6

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

pandas/core/reshape/merge.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
hashtable as libhashtable,
2626
join as libjoin,
2727
lib,
28+
new_vector as nv,
2829
)
2930
from pandas._libs.lib import is_range_indexer
3031
from pandas._typing import (
@@ -107,18 +108,18 @@
107108
from pandas.core.arrays import DatetimeArray
108109

109110
_factorizers = {
110-
np.int64: libhashtable.Int64Factorizer,
111-
np.longlong: libhashtable.Int64Factorizer,
112-
np.int32: libhashtable.Int32Factorizer,
113-
np.int16: libhashtable.Int16Factorizer,
114-
np.int8: libhashtable.Int8Factorizer,
115-
np.uint64: libhashtable.UInt64Factorizer,
116-
np.uint32: libhashtable.UInt32Factorizer,
117-
np.uint16: libhashtable.UInt16Factorizer,
118-
np.uint8: libhashtable.UInt8Factorizer,
119-
np.bool_: libhashtable.UInt8Factorizer,
120-
np.float64: libhashtable.Float64Factorizer,
121-
np.float32: libhashtable.Float32Factorizer,
111+
np.int64: nv.Int64Factorizer,
112+
np.longlong: nv.Int64Factorizer,
113+
np.int32: nv.Int32Factorizer,
114+
np.int16: nv.Int16Factorizer,
115+
np.int8: nv.Int8Factorizer,
116+
np.uint64: nv.UInt64Factorizer,
117+
np.uint32: nv.UInt32Factorizer,
118+
np.uint16: nv.UInt16Factorizer,
119+
np.uint8: nv.UInt8Factorizer,
120+
np.bool_: nv.UInt8Factorizer,
121+
np.float64: nv.Float64Factorizer,
122+
np.float32: nv.Float32Factorizer,
122123
np.complex64: libhashtable.Complex64Factorizer,
123124
np.complex128: libhashtable.Complex128Factorizer,
124125
np.object_: libhashtable.ObjectFactorizer,

0 commit comments

Comments
 (0)