PERF: perf improvements in drop_duplicates for integer dtyped arrays by jreback · Pull Request #10917 · pandas-dev/pandas (original) (raw)

New issue

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation0 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

jreback

no need to factorize integers when dropping duplicates.

master

In [1]: np.random.seed(1234)

In [2]: df = DataFrame({'A' : np.random.randint(0,10000,size=1000000)})                

In [3]: %timeit df.drop_duplicates()
10 loops, best of 3: 36.9 ms per loop

PR

In [2]: df = DataFrame({'A' : np.random.randint(0,10000,size=1000000)})

In [3]: %timeit df.drop_duplicates()
10 loops, best of 3: 21.6 ms per loop

@jreback

jreback added a commit that referenced this pull request

Aug 28, 2015

@jreback

PERF: perf improvements in drop_duplicates for integer dtyped arrays

This was referenced

Oct 21, 2015

1 participant

@jreback