Skip to content

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Nov 26, 2013

perf improvement in eval/query (and general take-like indexing)

In [1]: N = 1000000

In [2]: df = DataFrame({'a': np.random.randn(N)})

In [3]: min_val = df['a'].min()

In [4]: max_val = df['a'].max()

current master: 66980c6

In [5]: %timeit df.query('(a >= min_val) & (a <= max_val)')
10 loops, best of 3: 31.6 ms per loop

This PR

In [5]: %timeit df.query('(a >= min_val) & (a <= max_val)')
10 loops, best of 3: 20.2 ms per loop

jreback added a commit that referenced this pull request Nov 26, 2013
PERF: perf enhancements in indexing/query/eval
@jreback jreback merged commit b1485a3 into pandas-dev:master Nov 26, 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