Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERF: perf improvements in drop_duplicates for integer dtyped arrays #10917

Merged
merged 1 commit into from
Aug 28, 2015

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Aug 28, 2015

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 the Performance Memory or execution speed performance label Aug 28, 2015
@jreback jreback added this to the 0.17.0 milestone Aug 28, 2015
@jreback jreback mentioned this pull request Aug 28, 2015
12 tasks
jreback added a commit that referenced this pull request Aug 28, 2015
PERF: perf improvements in drop_duplicates for integer dtyped arrays
@jreback jreback merged commit 027817b into pandas-dev:master Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant