<s> from . pandas_vb_common import * <EOL> import pandas as pd <EOL> import pandas . computation . expressions as expr <EOL> class eval_frame ( object ) : <EOL> goal_time = <NUM_LIT> <EOL> params = [ [ '<STR_LIT>' , '<STR_LIT>' ] , [ <NUM_LIT:1> , '<STR_LIT:all>' ] ] <EOL> param_names = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> def setup ( self , engine , threads ) : <EOL> self . df = DataFrame ( np . random . randn ( <NUM_LIT> , <NUM_LIT:100> ) ) <EOL> self . df2 = DataFrame ( np . random . randn ( <NUM_LIT> , <NUM_LIT:100> ) ) <EOL> self . df3 = DataFrame ( np . random . randn ( <NUM_LIT> , <NUM_LIT:100> ) ) <EOL> self . df4 = DataFrame ( np . random . randn ( <NUM_LIT> , <NUM_LIT:100> ) ) <EOL> if threads == <NUM_LIT:1> : <EOL> expr . set_numexpr_threads ( <NUM_LIT:1> ) <EOL> def time_add ( self , engine , threads ) : <EOL> df , df2 , df3 , df4 = self . df , self . df2 , self . df3 , self . df4 <EOL> pd . eval ( '<STR_LIT>' , engine = engine ) <EOL> def time_and ( self , engine , threads ) : <EOL> df , df2 , df3 , df4 = self . df , self . df2 , self . df3 , self . df4 <EOL> pd . eval ( '<STR_LIT>' , engine = engine ) <EOL> def time_chained_cmp ( self , engine , threads ) : <EOL> df , df2 , df3 , df4 = self . df , self . df2 , self . df3 , self . df4 <EOL> pd . eval ( '<STR_LIT>' , engine = engine ) <EOL> def time_mult ( self , engine , threads ) : <EOL> df , df2 , df3 , df4 = self . df , self . df2 , self . df3 , self . df4 <EOL> pd . eval ( '<STR_LIT>' , engine = engine ) <EOL> class query_datetime_index ( object ) : <EOL> goal_time = <NUM_LIT> <EOL> def setup ( self ) : <EOL> self . N = <NUM_LIT> <EOL> self . halfway = ( ( self . N // <NUM_LIT:2> ) - <NUM_LIT:1> ) <EOL> self . index = date_range ( '<STR_LIT>' , periods = self . N , freq = '<STR_LIT:T>' ) <EOL> self . s = Series ( self . index ) <EOL> self . ts = self . s . iloc [ self . halfway ] <EOL> self . df = DataFrame ( { '<STR_LIT:a>' : np . random . randn ( self . N ) , } , index = self . index ) <EOL> def time_query_datetime_index ( self ) : <EOL> ts = self . ts <EOL> self . df . query ( '<STR_LIT>' ) <EOL> class query_datetime_series ( object ) : <EOL> goal_time = <NUM_LIT> <EOL> def setup ( self ) : <EOL> self . N = <NUM_LIT> <EOL> self . halfway = ( ( self . N // <NUM_LIT:2> ) - <NUM_LIT:1> ) <EOL> self . index = date_range ( '<STR_LIT>' , periods = self . N , freq = '<STR_LIT:T>' ) <EOL> self . s = Series ( self . index ) <EOL> self . ts = self . s . iloc [ self . halfway ] <EOL> self . df = DataFrame ( { '<STR_LIT>' : self . s . values , } ) <EOL> def time_query_datetime_series ( self ) : <EOL> ts = self . ts <EOL> self . df . query ( '<STR_LIT>' ) <EOL> class query_with_boolean_selection ( object ) : <EOL> goal_time = <NUM_LIT> <EOL> def setup ( self ) : <EOL> self . N = <NUM_LIT> <EOL> self . halfway = ( ( self . N // <NUM_LIT:2> ) - <NUM_LIT:1> ) <EOL> self . index = date_range ( '<STR_LIT>' , periods = self . N , freq = '<STR_LIT:T>' ) <EOL> self . s = Series ( self . index ) <EOL> self . ts = self . s . iloc [ self . halfway ] <EOL> self . N = <NUM_LIT> <EOL> self . df = DataFrame ( { '<STR_LIT:a>' : np . random . randn ( self . N ) , } ) <EOL> self . min_val = self . df [ '<STR_LIT:a>' ] . min ( ) <EOL> self . max_val = self . df [ '<STR_LIT:a>' ] . max ( ) <EOL> def time_query_with_boolean_selection ( self ) : <EOL> min_val , max_val = self . min_val , self . max_val <EOL> self . df . query ( '<STR_LIT>' ) </s>
