Skip to content

Commit 6ba07d4

Browse files
committed
use object nan in ObjectHashtable for NaN
1 parent 5e4d53b commit 6ba07d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/hashtable.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ from util cimport _checknan
77
cimport util
88

99
import numpy as np
10+
nan = np.nan
1011

1112
cdef extern from "numpy/npy_math.h":
1213
double NAN "NPY_NAN"
@@ -710,7 +711,7 @@ cdef class PyObjectHashTable(HashTable):
710711
uniques.append(val)
711712
elif not seen_na:
712713
seen_na = 1
713-
uniques.append(NAN)
714+
uniques.append(nan)
714715

715716
result = uniques.to_array()
716717

0 commit comments

Comments
 (0)