|
78 | 78 | name='eval_frame_and_one_thread',
|
79 | 79 | start_date=datetime(2013, 7, 26))
|
80 | 80 |
|
81 |
| -setup = common_setup |
82 | 81 | eval_frame_and_python = \
|
83 | 82 | Benchmark("pd.eval('(df > 0) & (df2 > 0) & (df3 > 0) & (df4 > 0)', engine='python')",
|
84 | 83 | common_setup, name='eval_frame_and_python',
|
|
102 | 101 | name='eval_frame_chained_cmp_one_thread',
|
103 | 102 | start_date=datetime(2013, 7, 26))
|
104 | 103 |
|
105 |
| -# setup = common_setup |
106 | 104 | eval_frame_chained_cmp_python = \
|
107 | 105 | Benchmark("pd.eval('df < df2 < df3 < df4', engine='python')",
|
108 | 106 | common_setup, name='eval_frame_chained_cmp_python',
|
|
129 | 127 | df = DataFrame({'dates': s.values})
|
130 | 128 | """
|
131 | 129 |
|
132 |
| -query_datetime_series = Benchmark("df.query('dates < ts')", |
| 130 | +query_datetime_series = Benchmark("df.query('dates < @ts')", |
133 | 131 | series_setup,
|
134 | 132 | start_date=datetime(2013, 9, 27))
|
135 | 133 |
|
136 | 134 | index_setup = setup + """
|
137 | 135 | df = DataFrame({'a': np.random.randn(N)}, index=index)
|
138 | 136 | """
|
139 | 137 |
|
140 |
| -query_datetime_index = Benchmark("df.query('index < ts')", |
| 138 | +query_datetime_index = Benchmark("df.query('index < @ts')", |
141 | 139 | index_setup, start_date=datetime(2013, 9, 27))
|
142 | 140 |
|
143 | 141 | setup = setup + """
|
|
147 | 145 | max_val = df['a'].max()
|
148 | 146 | """
|
149 | 147 |
|
150 |
| -query_with_boolean_selection = Benchmark("df.query('(a >= min_val) & (a <= max_val)')", |
151 |
| - index_setup, start_date=datetime(2013, 9, 27)) |
| 148 | +query_with_boolean_selection = Benchmark("df.query('(a >= @min_val) & (a <= @max_val)')", |
| 149 | + setup, start_date=datetime(2013, 9, 27)) |
152 | 150 |
|
0 commit comments