Skip to content

Series.unique converts uint64 to int64 (with overflow) #14721

Closed
@dnspies

Description

@dnspies
>>> import pandas as pd
>>> import numpy as np
>>> s = pd.Series([1,2,2**63], dtype=np.dtype('uint64'))
>>> s
0                      1
1                      2
2    9223372036854775808
dtype: uint64
>>> s.unique()
array([                   1,                    2, -9223372036854775808])

Series.unique should preserve whatever type the values are. But instead it changes from uint64 to int64.

INSTALLED VERSIONS

...
python: 3.4.3.final.0
python-bits: 64
...

...
pandas: 0.17.1
numpy: 1.10.4
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions