Closed
Description
xref https://github.com/pandas-dev/pandas/pull/15439/files#r101811209
In [1]: Series([1, 2, 2], dtype='int8').unique()
Out[1]: array([1, 2])
In [3]: Series([1, 2, 2], dtype='int32').unique()
Out[3]: array([1, 2])
In [4]: Series([1, 2, 2], dtype='int64').unique()
Out[4]: array([1, 2])
In [5]: Series([1, 2, 2], dtype='float32').unique()
Out[5]: array([ 1., 2.])
these should all be the original dtype.
We only create hashtables (and use them in unique) for int64
, float64
and uint64
, should do this for other dtypes.
https://github.com/pandas-dev/pandas/blob/master/pandas/src/hashtable_class_helper.pxi.in#L222
I thought there was an issue about this, but guess not.