Skip to content

Series.unique() dies with many NaNs #714

Closed
@kieranholland

Description

@kieranholland

Series.unique() dies with many NaNs:

import time

def test_unique(obj):
    for n in range(6):
        objs = Series([obj] * 10 ** n)
        start = time.time()
        objs.unique()
        stop = time.time()
        print('%6.0f %s' % (len(objs), stop - start))

test_unique('a')

       1 4.98294830322e-05
      10 2.40802764893e-05
     100 4.10079956055e-05
    1000 6.91413879395e-05
   10000 0.000164985656738
  100000 0.0013279914856

test_unique(float('nan'))

       1 3.91006469727e-05
      10 3.60012054443e-05
     100 0.000331163406372
    1000 0.0283088684082
   10000 2.71325206757
  100000 Boom!     

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