We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
int64
float64
uint64
I thought there was an issue about this, but guess not.
The text was updated successfully, but these errors were encountered:
Looks to be the case on master. Could use a test.
In [82]: In [1]: Series([1, 2, 2], dtype='int8').unique() ...: Out[82]: array([1, 2], dtype=int8) In [83]: In [3]: Series([1, 2, 2], dtype='int32').unique() ...: Out[83]: array([1, 2], dtype=int32) In [84]: In [4]: Series([1, 2, 2], dtype='int64').unique() ...: Out[84]: array([1, 2]) In [85]: In [5]: Series([1, 2, 2], dtype='float32').unique() ...: Out[85]: array([1., 2.], dtype=float32) In [86]: pd.__version__ Out[86]: '0.26.0.dev0+684.g953757a3e'
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
xref https://github.com/pandas-dev/pandas/pull/15439/files#r101811209
these should all be the original dtype.
We only create hashtables (and use them in unique) for
int64
,float64
anduint64
, 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.
The text was updated successfully, but these errors were encountered: