Skip to content

Conversation

@jreback
Copy link
Contributor

@jreback jreback commented Jun 28, 2013

related #4017, #4018

optimize the iloc case (which should be the same for unique and non-unique indicies)

In [1]: df = DataFrame({'A' : [0.1] * 30000000, 'B' : [1] * 30000000})

In [6]: idx = np.array(range(30000)) * 99

In [7]: df2 = DataFrame({'A' : [0.1] * 10000000, 'B' : [1] * 10000000})

In [8]: df2 = concat([df2, df2, df2])

In [9]: %timeit df.iloc[idx]
1000 loops, best of 3: 1.49 ms per loop

In [10]: %timeit df2.iloc[idx]
1000 loops, best of 3: 1.41 ms per loop

jreback added a commit that referenced this pull request Jun 28, 2013
PERF: optimize iloc for unique case
@jreback jreback merged commit 99acda4 into pandas-dev:master Jun 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant